Re: [LAD] making sense of Jack MIDI; or, is this an appropriate use for Jack?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Harry van Haaren <harryhaaren@...>
Cc: <linux-audio-dev@...>
Date: Sunday, February 17, 2013 - 9:21 pm

On Sun, Feb 17, 2013 at 10:35 AM, Harry van Haaren
wrote:

This scheme sounds error prone. In general, copying C++ objects via
memcpy (or writing them 1 byte at a time into the ringbuffer, which is
what I think you're proposing) is a bad idea. JACK ringbuffers are
ideally suited to passing simple types (like floats), and not vairable
sized things (like different derived Event classes). Your enum for
event types is a bit of a red flag, too. While its perfectly valid,
"type flags" like this more often than not accompany inflexible,
tightly coupled code (which may be fine in a small audio app, but few
apps stay small).

What about passing pointers via the ringbuffer? To free the event
objects, you could pass them back via a second ringbuffer so the RT
threads aren't responsible for deleting them.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Paul Coccoli, (Sun Feb 17, 9:21 pm)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Fri Feb 15, 5:53 pm)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Sat Feb 16, 12:16 pm)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Sat Feb 16, 5:22 pm)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Sat Feb 16, 9:39 am)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Sat Feb 16, 10:03 am)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Sat Feb 16, 11:03 am)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Fri Feb 15, 7:15 pm)