[vlc-commits] aout: select headphones stereo-mode if aout is using headphones
Thomas Guillem
git at videolan.org
Fri Jul 21 11:19:16 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jul 20 14:53:35 2017 +0200| [c4d4e374a08bfaf17c6080cb2485daa96a4bbd07] | committer: Thomas Guillem
aout: select headphones stereo-mode if aout is using headphones
Select it only if it's needed (ambisonics or channels count higher than 2) and
if the user didn't forced it.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c4d4e374a08bfaf17c6080cb2485daa96a4bbd07
---
src/audio_output/output.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 23c9aa6bfc..a2fe2b39c0 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -449,6 +449,15 @@ static void aout_PrepareStereoMode (audio_output_t *aout,
val.i_int = AOUT_VAR_CHAN_HEADPHONES;
txt.psz_string = _("Headphones");
var_Change (aout, "stereo-mode", VLC_VAR_ADDCHOICE, &val, &txt);
+
+ if (i_forced_stereo_mode == AOUT_VAR_CHAN_UNSET
+ && aout->current_sink_info.headphones)
+ {
+ i_forced_stereo_mode = AOUT_VAR_CHAN_HEADPHONES;
+ default_val.i_int = val.i_int;
+ var_Change (aout, "stereo-mode", VLC_VAR_SETVALUE, &default_val,
+ NULL);
+ }
}
/* The user may have selected a different channels configuration. */
More information about the vlc-commits
mailing list