简体   繁体   中英

ALSA's snd_pcm_get_chmap always returns NULL on my default device (pulse) on Ubuntu 18.04

I'm successfully rendering audio with alsa, however I'm completely incapable of determining the channel mapping. As various sources have stated, I'm calling snd_pcm_get_chmap after the hw & sw params are set and the device is prepared.

snd_config_get_string returns 'pulse' for this device which I'm presuming means it's an alsa/pulseaudio bridge for want of a better term.

Calling snd_strerror(errno) after snd_pcm_get_chmap fails is returning 'Socket operation on non-socket'. I should probably add that I'm debugging remotely from Visual Studio 2017 as that may be related.

I'd really like to be able to get the channel mapping. Any suggestions appreciated.

Pulse audio's list of ALSA issues states that it isn't currently possible to obtain the channel map. https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Issues/

There's no way to query the active channel map for a device

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM