Hi Gilles,
I think portmidi works the way you think it should. The only
"static" variable I see is the global pm_initialized, which is set to
FALSE by Pm_Terminate. Maybe you can use a debugger and breakpoints to
verify that
- pm_macosxcm_init() is actually called to rescan devices, and
- in pm_macosxcm_init(), after "numDevices =
MIDIGetNumberOfDevices();" the value changes when you plug in a new device.
Please let us know what you find. -Roger
On 11/23/13 12:23 AM, Gilles Barges wrote:
hello everybody, that's my first post here.
I'm writing a program using portmidi. MacOSX 10.7.
After opening a document, scrolling, zooming... a mouse click sends a
MIDI note.
The MIDI device that's used can be selected in a list.
At this point, regularly I have forgotten to power on my MIDI device !
(synth with USB)
So it doesn't appear in the list.
And :-(( I have to quit the program, re-launch, re-open, re-scroll,
re-zoom ...
So I tried to implement a "Rescan MIDI devices" action in my program.
I cannot achieve this.
I tried to Pm_Terminate(), the Pm_Initialize() again, but the PM
device list is not updated (my MIDI evice being now on-line)
I noticed there is a static variable in PM that prevents from
initializing twice ?
The only way I found was to quit the program and start it again.
If PM cannot re-scan devices, maybe this could be a reasonable request ?
Greetings
--
Gilles Barges.
_______________________________________________
media_api mailing list
media_api@create.ucsb.edu
http://lists.create.ucsb.edu/mailman/listinfo/media_api
_______________________________________________
media_api mailing list
media_api@create.ucsb.edu
http://lists.create.ucsb.edu/mailman/listinfo/media_api