[Tim Goetze <[EMAIL PROTECTED]>]
|
| On Apr 23 Knos wrote:
| 
| >[Tim Goetze <[EMAIL PROTECTED]>]
| >| the following method is known to work since alsa-0.6.x (as has been 
| >| said on alsa-devel):
| >| 
| >| 
| >| fd = open ("/dev/snd/midiCxDy", O_RDONLY); /* x = card, y = device */
| >| 
| >| while (!done)
| >| {
| >|   if (read (fd, &data, 1) == 1)
| >|     parse (data);
| >| }
| >| 
| >
| >I tried it manually with a simple cat /dev/snd/midiCxDy many times
| >before, to see if i could observe midi messages coming from my 
| >controler, but open blocks on the file. (because it is busy)
| 
| does open(2) return EBUSY on your system?

yes, well it's blocking with O_RDONLY, and if i add a O_NONBLOCK,
fd<0 fails with "Device or resource busy"

| over here cat /dev/snd/midiCxDy is quiet too, but the c code above
| does work; i think the needed trick is reading single bytes and iirc 
| that went unspoken against over alsa-devel some weeks ago.
| 
| let's hope it keeps on working :)

yes i *hope* this will still work because that's the only way i can have
portable midi support in all applications. (although i avoid at all costs
fifo(s) as some applications don't behave well with them .. they eat cpu,
i experience sound dropouts. The Virmidi has been a saviour until my alsa
upgrade to 0.9 :/

(PS: i put back lad on CC)
--
  n
++k

Reply via email to