[vlc-commits] aout: set maximum number of channels for ambisonics

Thomas Guillem git at videolan.org
Wed Jul 19 18:57:52 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jul 18 16:13:23 2017 +0200| [eaf73cb7e60391fd475e8c5f026d1b9a157238e1] | committer: Thomas Guillem

aout: set maximum number of channels for ambisonics

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eaf73cb7e60391fd475e8c5f026d1b9a157238e1
---

 src/audio_output/output.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index ce9cbe21f1..eb79479a8b 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -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;



More information about the vlc-commits mailing list