Hi all!
I'm currently writing ALSA driver for one program. My wish is to read
abilities of the particular sound device and allow one to choose among
the allowable for the device. So my code attempt is following:
if (snd_pcm_open(&(d->soundfd), d->device, SND_PCM_STREAM_PLAYBACK, 0)
< 0) {
fprintf(stderr, "Shit happens...2\n");
return;
}
if (snd_pcm_hw_params_any(d->soundfd, d->hwparams) < 0) {
fprintf(stderr, "Shit happens...3\n");
snd_pcm_close(d->soundfd);
return;
}
snd_pcm_close(d->soundfd);
And then analyse the hwparams object. This opens the device for the very
short time, but when the device is already opened (for instance, xmms is
playing) and doesn't support any kind of mixing (hw:0.0 at my CS4239),
the "snd_pcm_open" function hangs until the device will be released.
So my question is: may I obtain _any_ sound device parameters without
blocking? Or maybe it's possible to add the set of functions to alsa-lib
which will allow one to obtain info of the sound device without blocking it?
Thanks in advance,
Yury.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user