interpret CoreMidi unique ID as unsigned for consistency.
authorRobin Gareus <robin@gareus.org>
Wed, 11 Mar 2015 17:18:37 +0000 (18:18 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 11 Mar 2015 19:06:41 +0000 (20:06 +0100)
coremidi specifies it as SInt32 but system:midi_playback_-126632214 ,
even if only used internally, just does not seem right.

libs/backends/coreaudio/coremidi_io.cc

index 598a80c09434cd4b46a96c1a99f8295d4070a3d1..0cef589b89fe758ab86c43b0821dc1a22ccc3fd1 100644 (file)
@@ -297,7 +297,7 @@ CoreMidiIo::port_id (uint32_t port, bool input)
                ss << "system:midi_capture_";
                SInt32 id;
                if (noErr == MIDIObjectGetIntegerProperty(_input_endpoints[port], kMIDIPropertyUniqueID, &id)) {
-                       ss << (int)id;
+                       ss << (unsigned int)id;
                } else {
                        ss << port;
                }
@@ -305,7 +305,7 @@ CoreMidiIo::port_id (uint32_t port, bool input)
                ss << "system:midi_playback_";
                SInt32 id;
                if (noErr == MIDIObjectGetIntegerProperty(_output_endpoints[port], kMIDIPropertyUniqueID, &id)) {
-                       ss << (int)id;
+                       ss << (unsigned int)id;
                } else {
                        ss << port;
                }