Commit dad0c535 authored by agoode's avatar agoode Committed by Commit bot

Use kMIDIPropertyDisplayName instead of kMIDIPropertyName

From the documentation:
"Provides the Apple-recommended user-visible name for an endpoint, by combining the device and endpoint names."

This fixes the problem of port names of "Out Port 1", "Out Port 2" without a sense of the device it belongs to.

Review URL: https://codereview.chromium.org/1025903003

Cr-Commit-Position: refs/heads/master@{#321974}
parent 92277b82
......@@ -51,11 +51,13 @@ MidiPortInfo GetPortInfoFromEndpoint(MIDIEndpointRef endpoint) {
string name;
CFStringRef name_ref = NULL;
result = MIDIObjectGetStringProperty(endpoint, kMIDIPropertyName, &name_ref);
result = MIDIObjectGetStringProperty(endpoint, kMIDIPropertyDisplayName,
&name_ref);
if (result == noErr)
name = SysCFStringRefToUTF8(name_ref);
else
DLOG(WARNING) << "Failed to get kMIDIPropertyName with status " << result;
DLOG(WARNING) << "Failed to get kMIDIPropertyDisplayName with status "
<< result;
string version;
SInt32 version_number = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment