[LAD] alsa sequencer and sysex editing
Jens M Andreasen
jens.andreasen at comhem.se
Mon Jun 2 18:21:46 UTC 2008
On Mon, 2008-06-02 at 18:13 +0200, rdxesy at yahoo.de wrote:
> Now I just wait for an constant time (usleep) before I
> check the input queue. Problem: if the time is too short, i
> would have missed the answer, if I wait to long I waste
> My question is: how would I make sure to catch all answers
> from the device without using a thread and without just
> waiting for an constant time before I check if there is an
> answer( which is alo not very fail save, a message might
> take a little longer if there is traffic on the midibus)?
You /could/ use poll:
int poll(struct pollfd *fds, nfds_t nfds, int timeout);
.. which will block, but at most untill timeout, after which you can
notify the user to check his wirings.
> Thank you.
> Linux-audio-dev mailing list
> Linux-audio-dev at lists.linuxaudio.org
More information about the Linux-audio-dev