Skip to content

Commit

Permalink
aout: also propose stereo mix-mode if the spatialaudio module is missing
Browse files Browse the repository at this point in the history
If the content is not ambisonics.
  • Loading branch information
tguillem authored and robUx4 committed Dec 14, 2022
1 parent 93f4238 commit 4d23894
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/audio_output/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,10 +577,13 @@ static void aout_SetupMixModeChoices (audio_output_t *aout,

const bool has_spatialaudio = module_exists("spatialaudio");

aout_AddMixModeChoice(aout, AOUT_MIX_MODE_UNSET, _("Original"), fmt);

if (fmt->channel_type != AUDIO_CHANNEL_TYPE_AMBISONICS && has_spatialaudio)
/* Don't propose the mix option if we don't have the spatialaudio module
* and if the content is ambisonics */
if (fmt->channel_type != AUDIO_CHANNEL_TYPE_AMBISONICS || has_spatialaudio)
{
aout_AddMixModeChoice(aout, AOUT_MIX_MODE_UNSET, _("Original"), fmt);
aout_AddMixModeChoice(aout, AOUT_MIX_MODE_STEREO, _("Stereo"), NULL);
}

if (has_spatialaudio)
aout_AddMixModeChoice(aout, AOUT_MIX_MODE_BINAURAL, _("Binaural"), NULL);
Expand Down

0 comments on commit 4d23894

Please sign in to comment.