[alsa-devel] non-blocking mode example

ThomasJF tsepp2001 at t-online.de
Thu Aug 17 18:47:06 CEST 2017


If I use a higher timeout than 0 with poll, the stream starts without 
snd_pcm_wait().

Now I get these snd_pcm_writei errors:

stop: File descriptor in bad state
pause: ok
play (after pause): Resource temporarily unavailable

Regards
Thomas


Am 17.08.2017 um 18:03 schrieb ThomasJF:
> Without snd_pcm_wait() I get an open error (Device or resource busy).
>
> In short I have inside the loop:
>
> poll(ufds, 2, 0);
> snd_pcm_wait()
> snd_pcm_writei(...)
>
> Regards
> Thomas
>
>
> Am 17.08.2017 um 16:48 schrieb Clemens Ladisch:
>> ThomasJF wrote:
>>> now it is working with poll and the two fds. Also pause, play and stop.
>>>
>>> If it stops, the snd_pcm_wait in my loop returns a negative error code
>> Why are you calling snd_pcm_wait() when you already have poll()?
>>
>>
>> Regards,
>> Clemens
>> _______________________________________________
>> Alsa-devel mailing list
>> Alsa-devel at alsa-project.org
>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>



More information about the Alsa-devel mailing list