Thank you again Clemens,
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 and the state changes to SND_PCM_STATE_SETUP, then it finishes and everything seems to be ok.
Anything to do here?
Best regards Thomas
Am 15.08.2017 um 14:49 schrieb Clemens Ladisch:
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 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel