Fix CoreMidi warnings
This commit is contained in:
parent
8068d0217a
commit
cb99a15064
@ -277,7 +277,7 @@ OSStatus AudioDriverCoreAudio::input_callback(void *inRefCon,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINT(("AudioUnitRender failed, code: " + itos(result)).utf8().get_data());
|
ERR_PRINTS("AudioUnitRender failed, code: " + itos(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
ad->unlock();
|
ad->unlock();
|
||||||
@ -289,7 +289,7 @@ void AudioDriverCoreAudio::start() {
|
|||||||
if (!active) {
|
if (!active) {
|
||||||
OSStatus result = AudioOutputUnitStart(audio_unit);
|
OSStatus result = AudioOutputUnitStart(audio_unit);
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
ERR_PRINT(("AudioOutputUnitStart failed, code: " + itos(result)).utf8().get_data());
|
ERR_PRINTS("AudioOutputUnitStart failed, code: " + itos(result));
|
||||||
} else {
|
} else {
|
||||||
active = true;
|
active = true;
|
||||||
}
|
}
|
||||||
@ -300,7 +300,7 @@ void AudioDriverCoreAudio::stop() {
|
|||||||
if (active) {
|
if (active) {
|
||||||
OSStatus result = AudioOutputUnitStop(audio_unit);
|
OSStatus result = AudioOutputUnitStop(audio_unit);
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
ERR_PRINT(("AudioOutputUnitStop failed, code: " + itos(result)).utf8().get_data());
|
ERR_PRINTS("AudioOutputUnitStop failed, code: " + itos(result));
|
||||||
} else {
|
} else {
|
||||||
active = false;
|
active = false;
|
||||||
}
|
}
|
||||||
|
@ -51,13 +51,13 @@ Error MIDIDriverCoreMidi::open() {
|
|||||||
OSStatus result = MIDIClientCreate(name, NULL, NULL, &client);
|
OSStatus result = MIDIClientCreate(name, NULL, NULL, &client);
|
||||||
CFRelease(name);
|
CFRelease(name);
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
ERR_PRINTS("MIDIClientCreate failed: " + String(GetMacOSStatusErrorString(result)));
|
ERR_PRINTS("MIDIClientCreate failed, code: " + itos(result));
|
||||||
return ERR_CANT_OPEN;
|
return ERR_CANT_OPEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = MIDIInputPortCreate(client, CFSTR("Godot Input"), MIDIDriverCoreMidi::read, (void *)this, &port_in);
|
result = MIDIInputPortCreate(client, CFSTR("Godot Input"), MIDIDriverCoreMidi::read, (void *)this, &port_in);
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
ERR_PRINTS("MIDIInputPortCreate failed: " + String(GetMacOSStatusErrorString(result)));
|
ERR_PRINTS("MIDIInputPortCreate failed, code: " + itos(result));
|
||||||
return ERR_CANT_OPEN;
|
return ERR_CANT_OPEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ Error MIDIDriverCoreMidi::open() {
|
|||||||
for (int i = 0; i < sources; i++) {
|
for (int i = 0; i < sources; i++) {
|
||||||
|
|
||||||
MIDIEndpointRef source = MIDIGetSource(i);
|
MIDIEndpointRef source = MIDIGetSource(i);
|
||||||
if (source != NULL) {
|
if (source) {
|
||||||
MIDIPortConnectSource(port_in, source, (void *)this);
|
MIDIPortConnectSource(port_in, source, (void *)this);
|
||||||
connected_sources.insert(i, source);
|
connected_sources.insert(i, source);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user