Commit a85ca0ed authored by Thomas Guillem's avatar Thomas Guillem

aout: add headphones option in stereo-mode

parent 711650ed
......@@ -95,6 +95,7 @@
#define AOUT_VAR_CHAN_LEFT 3
#define AOUT_VAR_CHAN_RIGHT 4
#define AOUT_VAR_CHAN_DOLBYS 5
#define AOUT_VAR_CHAN_HEADPHONES 6
/*****************************************************************************
* Main audio output structures
......
......@@ -453,6 +453,13 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt,
txt.psz_string = _("Reverse stereo");
var_Change (aout, "stereo-mode", VLC_VAR_ADDCHOICE, &val, &txt);
if (fmt->i_channels >= 2)
{
val.i_int = AOUT_VAR_CHAN_HEADPHONES;
txt.psz_string = _("Headphones");
var_Change (aout, "stereo-mode", VLC_VAR_ADDCHOICE, &val, &txt);
}
/* The user may have selected a different channels configuration. */
switch (i_forced_stereo_mode)
{
......@@ -471,6 +478,9 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt,
case AOUT_VAR_CHAN_DOLBYS:
fmt->i_chan_mode = AOUT_CHANMODE_DOLBYSTEREO;
break;
case AOUT_VAR_CHAN_HEADPHONES:
filters_cfg->headphones = true;
break;
default:
if (b_stereo_original && fmt->i_chan_mode & AOUT_CHANMODE_DUALMONO)
{ /* Go directly to the left channel. */
......
......@@ -187,11 +187,13 @@ static const char *const ppsz_force_dolby_descriptions[] = {
#define STEREO_MODE_TEXT N_("Stereo audio output mode")
static const int pi_stereo_mode_values[] = { AOUT_VAR_CHAN_UNSET,
AOUT_VAR_CHAN_STEREO, AOUT_VAR_CHAN_RSTEREO,
AOUT_VAR_CHAN_LEFT, AOUT_VAR_CHAN_RIGHT, AOUT_VAR_CHAN_DOLBYS
AOUT_VAR_CHAN_LEFT, AOUT_VAR_CHAN_RIGHT, AOUT_VAR_CHAN_DOLBYS,
AOUT_VAR_CHAN_HEADPHONES,
};
static const char *const ppsz_stereo_mode_texts[] = { N_("Unset"),
N_("Stereo"), N_("Reverse stereo"),
N_("Left"), N_("Right"), N_("Dolby Surround")
N_("Left"), N_("Right"), N_("Dolby Surround"),
N_("Headphones"),
};
#define AUDIO_FILTER_TEXT N_("Audio filters")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment