File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -368,6 +368,7 @@ class MidiDeviceManager final : public ChangeListener
368368 if (!port.enabled )
369369 continue ;
370370 for (auto const * device : port.devices ) {
371+ if (midiOutputsTree.getChildWithProperty (" Name" , device->getName ()).isValid ()) continue ;
371372 ValueTree midiOutputPort (" MidiPort" );
372373 midiOutputPort.setProperty (" Name" , device->getName (), nullptr );
373374 midiOutputPort.setProperty (" Port" , outputPorts.index_of_address (port) - 1 , nullptr );
@@ -381,6 +382,7 @@ class MidiDeviceManager final : public ChangeListener
381382 if (!port.enabled )
382383 continue ;
383384 for (auto const * device : port.devices ) {
385+ if (midiInputsTree.getChildWithProperty (" Name" , device->getName ()).isValid ()) continue ;
384386 ValueTree midiInputPort (" MidiPort" );
385387 midiInputPort.setProperty (" Name" , device->getName (), nullptr );
386388 midiInputPort.setProperty (" Port" , inputPorts.index_of_address (port) - 1 , nullptr );
You can’t perform that action at this time.
0 commit comments