[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to check for MIDI input?



On Tue, Mar 28, 2006 at 07:00:00PM +0200, Robert Epprecht wrote:
> How can I check for MIDI input without blocking the program flow?

Open the file in non-blocking mode (i.e. pass O_NONBLOCK to open(2)), 
and use select(2) to determine readability.  read(2) will then return 
-1/EAGAIN when there's no data to read.



Reply to: