Hi Victor,
I'm not sure exactly what is going on, but I think that there are a
couple of issues that might go deeper than just global variables or an
object-instance-based design. First, there's the issue of what it means
to have multiple threads in one process doing MIDI. Do the threads share
MIDI output and merge messages, or do they have separate output devices,
and who enforces that? Second, what about MIDI input. Are messages
copied to each listener, or is there a shared input queue and readers
cooperate? With Core MIDI and OS X, I think you have more flexibility in
that the system can merge messages and allow more than one process to
open a port for output. I don't think you can do that in Windows.
Anyway, I'm not opposed to changes, but my first reaction is that maybe
all you need is a wrapper in front of PortMIDI that gives mutual
exclusion. This is not there because of the priority inversion problem
that would make behavior less predictable, but if sharing MIDI in your
case might require mutual exclusion somewhere anyway.
-Roger
_______________________________________________
media_api mailing list
[email protected]
http://lists.create.ucsb.edu/mailman/listinfo/media_api