[Stk] RtMidi: dynamic port query not working in OS-X

Gary Scavone gary at ccrma.Stanford.EDU
Fri Aug 17 17:28:58 PDT 2012


Hi all,

Axel reported the problem below and I have verified it (at least on OS-X 10.8).  Internally, RtMidi does not save any port information … rather, it re-queries the system whenever the getPortCount() and getPortName() functions are called.  But when I try firing up new programs that create MIDI ports (or deleting existing ones) after an RtMidi instance is created, the port information is not updated.

Has anyone seen this behaviour before and does anyone know of a fix?  Perhaps the CoreMidi team at Apple added a new mysterious and undocumented property that needs to be set for things to work correctly (as they did with Audio services a few OS versions ago)?

I'm attaching a small program that can be used to check the behaviour.

Regards,

--gary

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mytest.cpp
Type: application/octet-stream
Size: 511 bytes
Desc: not available
Url : http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20120817/46a39d2d/attachment.obj 
-------------- next part --------------


Begin forwarded message:

> From: Axel <dotnet-freak at gmx.net>
> Subject: rtmidi question
> Date: 11 August, 2012 9:25:07 AM PDT
> To: gary at music.mcgill.ca
> 
> Hi Gary,
> 
> first of all, thanks for the excellent midi library. I use it to extend a daw with midi out capabilities and it works really good so far. However, I noticed that all midi devices have to be plugged in before the application is started. Querying the ports at runtime, with or without newly allocated RtMidiOut objects seems to return always the connected ports form the point the program was started. Is there a way to detect changes during runtime?
> 
> I'm working on OSX, but it should also work on window later.
> 
> Thanks in advance.
> 
> Best regards,
> Axel



More information about the Stk mailing list