[alsa-devel] default is working, but hw:0,0 is do not...
Hi all.
I have problem with openning a device for playback.
this is working code: snd_pcm_open(&handle, "default", SND_PCM_STREAM_PLAYBACK, 0);
but this is not working: snd_pcm_open(&handle, "hw:0,0", SND_PCM_STREAM_PLAYBACK, 0);
I get this is: Device or resource busy
PS: I have been started the `phonon' (KDE sound daemon), and the amarok (audio player).
My question: what I need to do for correct open "hw:0,0" for multiply playback ?
Thanks.
The Best Regards.
On 01/24/2012 08:15 PM, Dmitrij K wrote:
Hi all.
I have problem with openning a device for playback.
this is working code: snd_pcm_open(&handle, "default", SND_PCM_STREAM_PLAYBACK, 0);
but this is not working: snd_pcm_open(&handle, "hw:0,0", SND_PCM_STREAM_PLAYBACK, 0);
I get this is: Device or resource busy
PS: I have been started the `phonon' (KDE sound daemon), and the amarok (audio player).
My question: what I need to do for correct open "hw:0,0" for multiply playback ?
Make sure that nobody else is using the device at the same time. "hw:0,0" requires exclusive access to the device.
You can see who is currently using your sound device(s) using this command:
sudo fuser -v /dev/snd/*
David Henningsson wrote:
Make sure that nobody else is using the device at the same time. "hw:0,0" requires exclusive access to the device.
OK! Thanks for the important information!
I have used RtAudio library (not worked for me), and this is:
RtAudio::StreamOptions options; options.flags = RTAUDIO_ALSA_USE_DEFAULT;
has solved the problem...
The Best Regards.
participants (2)
-
David Henningsson
-
Dmitrij K