# HG changeset patch # User Chris Cannam # Date 1235416138 0 # Node ID a5e0d1068caee5966d021ad218f397b9b6039121 # Parent ecce042cc374bbe36e7588fa43d90a6f7c493745 * os/x build fixes diff -r ecce042cc374 -r a5e0d1068cae data/midi/rtmidi/RtMidi.cpp --- a/data/midi/rtmidi/RtMidi.cpp Mon Feb 23 17:50:17 2009 +0000 +++ b/data/midi/rtmidi/RtMidi.cpp Mon Feb 23 19:08:58 2009 +0000 @@ -315,7 +315,9 @@ { // Set up our client. MIDIClientRef client; - OSStatus result = MIDIClientCreate( CFSTR(name.c_str()), NULL, NULL, &client ); + OSStatus result = MIDIClientCreate + ( CFStringCreateWithBytes(0, (unsigned char *)name.data(), + name.size(), kCFStringEncodingUTF8, 0), NULL, NULL, &client ); if ( result != noErr ) { errorString_ = "RtMidiIn::initialize: error creating OS-X MIDI client object."; error( RtError::DRIVER_ERROR ); @@ -352,7 +354,7 @@ MIDIPortRef port; CoreMidiData *data = static_cast (apiData_); - OSStatus result = MIDIInputPortCreate( data->client, CFSTR("RtMidi MIDI Input Port"), midiInputCallback, (void *)&inputData_, &port ); + OSStatus result = MIDIInputPortCreate( data->client, CFSTR("MIDI Input Port"), midiInputCallback, (void *)&inputData_, &port ); if ( result != noErr ) { MIDIClientDispose( data->client ); errorString_ = "RtMidiIn::openPort: error creating OS-X MIDI input port."; @@ -483,7 +485,9 @@ { // Set up our client. MIDIClientRef client; - OSStatus result = MIDIClientCreate( CFSTR(name.c_str()), NULL, NULL, &client ); + OSStatus result = MIDIClientCreate + ( CFStringCreateWithBytes(0, (unsigned char *)name.data(), + name.size(), kCFStringEncodingUTF8, 0), NULL, NULL, &client ); if ( result != noErr ) { errorString_ = "RtMidiOut::initialize: error creating OS-X MIDI client object."; error( RtError::DRIVER_ERROR ); @@ -519,7 +523,7 @@ MIDIPortRef port; CoreMidiData *data = static_cast (apiData_); - OSStatus result = MIDIOutputPortCreate( data->client, CFSTR("RtMidi Virtual MIDI Output Port"), &port ); + OSStatus result = MIDIOutputPortCreate( data->client, CFSTR("Virtual MIDI Output Port"), &port ); if ( result != noErr ) { MIDIClientDispose( data->client ); errorString_ = "RtMidiOut::openPort: error creating OS-X MIDI output port.";