2006/3/24, kurmisk <[EMAIL PROTECTED]>:
> I have write my small _alsa_test_program_.
> [C code ckunkz see below]
> It works good but now i wanna before call
> rc = snd_pcm_writei(handle, buffer, frames);
> somehow check - is sound device free for this call or not.
>
> For OSS i have such problem solve with  select() :
>  fdo = open("/dev/dsp", O_WRONLY );
> .....
>       FD_ZERO(&wfds);
>       FD_SET( fdo , &wfds);     Zeit.tv_sec=0;   Zeit.tv_usec=1;
>       response=select(fdo+1, NULL, &wfds, NULL, & Zeit );

You can use snd_pcm_poll_descriptors to get a fildescriptor to select on.

-Richard

Reply via email to