Browse Source

macOS: Fallback for creating unique ID for MIDI ports if the bundleRef isn't created

tags/2021-05-28
ed 6 years ago
parent
commit
de251d36ed
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp

+ 3
- 2
modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp View File

@@ -197,9 +197,10 @@ namespace CoreMidiHelpers
} }
#endif #endif
if (uniqueID.isNotEmpty())
uniqueID += "." + deviceName + (isInput ? ".input" : ".output");
if (uniqueID.isEmpty())
uniqueID = String (Random::getSystemRandom().nextInt (1024));
uniqueID += "." + deviceName + (isInput ? ".input" : ".output");
return uniqueID.hashCode(); return uniqueID.hashCode();
} }


Loading…
Cancel
Save