[alsa-devel] non-blocking mode example

Clemens Ladisch clemens at ladisch.de
Tue Aug 15 14:49:16 CEST 2017


ThomasJF wrote:
> Now I have a do-while loop with select.

Better use poll(); select() is cumbersome with the ALSA's API.

> To get the tcp-commands for stop/pause:
>
> 1.) Do I have to adapt the tcp-commands inside this loop or...
>
> 2.) Do I have to work with any poll descriptors (which?)

These function allow to wait for multiple file descriptors to become
ready.  So wait for all the fds from the ALSA device _and_ the fd of
the socket.


Regards,
Clemens


More information about the Alsa-devel mailing list