On Wed, 17 Oct 2001, Paul Davis wrote:

> snd_pcm_avail_update(): this simply updates the information on the
> number of available bytes. as you have noted, it does not block.

what is snd_pcm_set_avail_main() for, then? 

> 
> your code does this:
> 
>      if (this->stream == SND_PCM_STREAM_PLAYBACK) {
>             if (poll (&pfd, 1, 1000) < 0) {
> 
> which means you are not polling at all for a capture stream.
> 
> ergo, your code does not block, ergo it uses close to 100% of the CPU.
> 
> :)

your observations are astute :)

which brings us to the subject of the email, what is the proper way to block, or
wait, on a capture device?

I just came to a pseudo-epiphany, but I can't test it atm. Do I poll on the fd,
but set pfd.events = POLLIN | POLLERR?

Thanks for your patience :)

wingo

_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to