It seems I don't understand the ALSA architecture, even after reading most of the documentation on offer:
I list all the available ALSA devices using snd_device_name_hint() and snd_device_name_get_hint(). This lists, among others "pulse" under hwdep class so it looks like PulseAudio is available in my system. But when I try to open it with snd_开发者_如何转开发pcm_open() (non-blocking mode and either in or out) I get "No such file or directory".
What gives? I can open other devices, for instance the in-built Intel chip works fine, why doesn't PulseAudio?
Is pulseaudio running with the alsa emulation plugin loaded before you try to open the pulse device? If I understand how asoundrc files work you can create virtual alsa devices from the config file (which is how a pulse device gets created) which will exist whether the backend for that virtual device is running or not.
精彩评论