aout: set maximum number of channels for ambisonics
authorThomas Guillem <thomas@gllm.fr>
Tue, 18 Jul 2017 14:13:23 +0000 (16:13 +0200)
committerThomas Guillem <thomas@gllm.fr>
Wed, 19 Jul 2017 16:06:26 +0000 (18:06 +0200)
src/audio_output/output.c

index ce9cbe2..eb79479 100644 (file)
@@ -493,6 +493,14 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt,
             aout_SetWavePhysicalChannels(fmt);
         }
 
+        if (fmt->channel_type == AUDIO_CHANNEL_TYPE_AMBISONICS)
+        {
+            /* Set the maximum of channels to render ambisonics contents. The
+             * aout module will still be free to select less channels in order
+             * to respect the sink setup. */
+            fmt->i_physical_channels = AOUT_CHANS_7_1;
+        }
+
         /* Try to stay in integer domain if possible for no/slow FPU. */
         fmt->i_format = (fmt->i_bitspersample > 16) ? VLC_CODEC_FL32
                                                     : VLC_CODEC_S16N;