65 |
MidiInputDeviceCoreMidi::MidiInputPortCoreMidi::MidiInputPortCoreMidi(MidiInputDeviceCoreMidi* pDevice) throw (MidiInputException) : MidiInputPort(pDevice, -1) { |
MidiInputDeviceCoreMidi::MidiInputPortCoreMidi::MidiInputPortCoreMidi(MidiInputDeviceCoreMidi* pDevice) throw (MidiInputException) : MidiInputPort(pDevice, -1) { |
66 |
// create CoreMidi virtual destination |
// create CoreMidi virtual destination |
67 |
|
|
68 |
MIDIDestinationCreate(pDevice->hCoreMidiClient, CFSTR("LinuxSampler_in"), ReadProc, this, &pDestination); |
/* 20080105 Toshi Nagata */ |
69 |
|
char buf[32]; |
70 |
|
CFStringRef str; |
71 |
|
snprintf(buf, sizeof buf, "LinuxSampler_in_%d", pPortID); |
72 |
|
str = CFStringCreateWithCString(NULL, buf, kCFStringEncodingUTF8); |
73 |
|
MIDIDestinationCreate(pDevice->hCoreMidiClient, str, ReadProc, this, &pDestination); |
74 |
|
/* */ |
75 |
|
|
76 |
if (!pDestination) throw MidiInputException("Error creating CoreMidi virtual destination"); |
if (!pDestination) throw MidiInputException("Error creating CoreMidi virtual destination"); |
77 |
this->portNumber = pPortID++; |
this->portNumber = pPortID++; |
78 |
|
|
176 |
} |
} |
177 |
|
|
178 |
String MidiInputDeviceCoreMidi::Version() { |
String MidiInputDeviceCoreMidi::Version() { |
179 |
String s = "$Revision: 1.9 $"; |
String s = "$Revision: 1.10 $"; |
180 |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
181 |
} |
} |
182 |
|
|