[vlc-commits] aout: pulse: handle AUDIO_CHANNELS_TYPE_AMBISONICS

Thomas Guillem git at videolan.org
Wed Jul 19 18:58:29 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jun 23 17:41:55 2017 +0200| [f201e28463e6fc7dcbf8c3999af218cb36d9bdef] | committer: Thomas Guillem

aout: pulse: handle AUDIO_CHANNELS_TYPE_AMBISONICS

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

 modules/audio_output/pulse.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 81dd586658..fb70933f38 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -802,6 +802,16 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
     if (ss.format != PA_SAMPLE_INVALID)
         pa_format_info_set_sample_format(formatv, ss.format);
 
+    if (fmt->channel_type == AUDIO_CHANNEL_TYPE_AMBISONICS)
+    {
+        fmt->channel_type = AUDIO_CHANNEL_TYPE_BITMAP;
+
+        /* Setup low latency in order to quickly react to ambisonics
+         * filters viewpoint changes. */
+        flags |= PA_STREAM_ADJUST_LATENCY;
+        attr.tlength = pa_usec_to_bytes(2 * AOUT_MIN_PREPARE_TIME, &ss);
+    }
+
     if (encoding != PA_ENCODING_PCM)
     {
         pa_format_info_set_channels(formatv, ss.channels);



More information about the vlc-commits mailing list