Paul Davis wrote:
> 
> >> there is absolutely nothing that i know of above read/write/open/close
> >> in the ALSA raw MIDI API that is of use to any application I have ever
> >> seen.
> >
> >No drop, no drain, no status, no avail_min, no buffer_size?
> 
> I've never seen a program that does raw MIDI I/O that would use any of
> these. the (my) model of a raw MIDI device doesn't include any of
> these concepts. when i write data to a raw MIDI device, i expect:
> 
>       * it either gets put on the wire immediately, OR
>       * my thread blocks until it can be put on the wire

As far as I know, this is not true for current ALSA implementation. It
seems you want an O_SYNC behaviour.

> 
> if i read from it, then
> 
>       * i get data immediately, OR
>       * i block until data is received from the wire
> 
> (ignoring O_NONBLOCK, etc.). the concept of "drain", "drop" etc. don't
> have any place in the way i think about "raw MIDI". whats the status
> of a UART delivery bytes to a wire ? there isn't one, other than a
> permanent error. i am not sure how these crept into the alsa API. they
> certainly belong in the sequencer API, but raw MIDI ? i don't think so.
> 
> >No support for client/server using the same API.
> 
> FIFOs, sockets and pipes provide the same thing, and the standard
> syscall API works, whether the underlying MIDI device is supported by
> an ALSA driver, OSS, or something else entirely.

Low latency inet transfer using UDP and redundant transmit?

> 
> >To have a rawmidi type for use with ordinary files (FIFO, sockets and
> >pipes) it's trivial to implement.
> >
> >snd_rawmidi_open(NULL, &output, "file:/tmp/RMIDI", 0);
> 
> and a pre-existing socket ? stdout ?

snd_rawmidi_fd_attach(NULL, &output, "name", fd, 0, 0);
snd_rawmidi_stdio_attach(NULL, &output, "name", stdout, 0, 0)

-- 
Abramo Bagnara                       mailto:[EMAIL PROTECTED]

Opera Unica                          Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy

ALSA project               http://www.alsa-project.org
It sounds good!

Reply via email to