Commit 72ee0103 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf
Browse files

aout: don't propose binaural mix mode if no module can handle it

parent 483c3c7e
......@@ -559,15 +559,18 @@ static void aout_SetupMixModeChoices (audio_output_t *aout,
if (fmt->i_channels <= 2)
return;
const bool has_spatialaudio = module_exists("spatialaudio");
aout_AddMixModeChoice(aout, AOUT_MIX_MODE_UNSET, _("Original"), fmt);
if (fmt->channel_type != AUDIO_CHANNEL_TYPE_AMBISONICS)
if (fmt->channel_type != AUDIO_CHANNEL_TYPE_AMBISONICS && has_spatialaudio)
aout_AddMixModeChoice(aout, AOUT_MIX_MODE_STEREO, _("Stereo"), NULL);
aout_AddMixModeChoice(aout, AOUT_MIX_MODE_BINAURAL, _("Binaural"), NULL);
if (has_spatialaudio)
aout_AddMixModeChoice(aout, AOUT_MIX_MODE_BINAURAL, _("Binaural"), NULL);
/* Only propose Original and Binaural for Ambisonics content */
if (fmt->channel_type == AUDIO_CHANNEL_TYPE_AMBISONICS)
if (fmt->channel_type == AUDIO_CHANNEL_TYPE_AMBISONICS && has_spatialaudio)
return;
if (fmt->i_physical_channels != AOUT_CHANS_4_0)
......
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