1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

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

This commit is contained in:
ed 2019-03-14 12:42:09 +00:00
parent 11aee7cb6a
commit de251d36ed

View file

@ -197,9 +197,10 @@ namespace CoreMidiHelpers
}
#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();
}