[vlc-devel] [PATCH 15/16] pulse: handle AUDIO_CHANNELS_TYPE_AMBISONICS

RĂ©mi Denis-Courmont remi at remlab.net
Tue Jul 11 16:15:28 CEST 2017

On mardi 11 juillet 2017 15:49:13 EEST Thomas Guillem wrote:
> > > > Why do you impose the channel order here?!
> > > 
> > > I use the current channel layout of the pulse stream. The ambisonics
> > > renderer need the output channel layout untouched since the rendering
> > > algorithm depend of the channel layout.
> > 
> > If you fix the channel map, not only you need to reorder (which is
> > wasteful and
> > was carefully avoided previously) but you have to support *every* channel
> > positions defined by PulseAudio, or you might fail to playback
> > completely.
> > 
> > Good luck with that... Seriously,that seems highly impractical.
> This will be used only for ambisonics content. The ambisonics audio
> renderer works only with the channels layout handled by VLC. In that
> case, it's OK to not support *every* channel positions defined by
> pulseaudio since it's better to do a good rendering on the few channels
> we know. But I forgot to handle the extra channels (add 0s for every
> channels that is not handled by VLC)

If you fix the stream channels, you agree to support whatever the mapping will 
be. You cannot not support one position, unless you accept failing to playback 

> Maybe, in case of ambisonics, I should start a stream with the fixed
> flags in order to know the channel positions and then adapt it.

Repeating myself but that can't work, since the layout can change 
asynchronously due to card configuration, other sink inputs coming and going, 
hot plug/unplug or most obviously sink move.

I would be rather pissed as a user, if an ambisonic remained stereo just 
because it started in a currently stereo sink.

More information about the vlc-devel mailing list