Not possible to have I/O pair of MIDI ports with same name?

Hey, just wanting to verify that in JUCE, you can’t set up an I/O pair of virtual MIDI ports for an app and give them the same name?

std::unique_ptr<MidiOutput> myMidiOut;
std::unique_ptr<MidiInput>  myMidiIn;

myMidiOut = MidiOutput::createNewDevice("My App");
jassert(myMidiOut != nullptr);

myMidiIn = MidiInput::createNewDevice("My App", this);
jassert(myMidiIn != nullptr);  // this gets thrown

If I change the device name for one of the pair to something different, it works fine.

I’ve done Max standalone apps before where each port of an I/O pair had the same names, so the macOS MIDI system seems fine with it. Seems to be a limitation of how JUCE handles the ports…?

Looks like there was a typo in the part of the CoreMIDI code which creates the unique name for MIDI ports which I’ve fixed in 50f90fd, this should solve your issue.

Excellent, thank you for the quick fix!