29 Jun
2011
29 Jun
'11
1:47 p.m.
Hi,
I'm writing a piece of code that uses ALSA audio devices, where I open the same output device multiple times, as a simple way to have parallel audio channels, where I can send audio data to each 'channel' (PCM handle) simultaneously, and the ALSA layer will mix the audio together.
My experience is that this works with some audio devices (for example, with a pulse audio - ALSA gateway), but not on some other devices (for example, on a USB sound device, driven by ALSA). In the latter case, snd_pcm_open() will refuse to open the audio device multiple times.
I wonder what the generic concept here is - is it generally 'OK' to open an audio device multiple times? If not, why not? :)
Akos