Re: [linux-audio-dev] [ot] rawmidi && alsa

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] [ot] rawmidi && alsa
From: Knos (knos_AT_free.fr)
Date: Tue Apr 24 2001 - 08:28:54 EEST


[Tim Goetze <tim_AT_quitte.de>]
|
| On Apr 23 Knos wrote:
|
| >[Tim Goetze <tim_AT_quitte.de>]
| >| 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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Apr 24 2001 - 09:10:53 EEST