31 Mar
2014
31 Mar
'14
2:29 p.m.
Tobias Schlemmer wrote:
I'm surprised that the upcoming version of RtMidi uses one ALSA client per MIDI port.
I found out that sequencer handles (snd_seq_t) are not thread safe.
A sequencer client use a common buffer for the events of all ports.
Could you provide some way to implement multithreaded ALSA clients?
Multiple threads would have to synchronize the buffer accesses in some way. How exactly merging and distributing of events from/to multiple ports is handled (even when some thread does not react) is a policy that cannot be imposed by the ALSA library.
Regards, Clemens