From 7d6cd2ac83c0733af5cc7959888292932016b6de Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 11 Mar 2017 18:16:05 +0100 Subject: [PATCH] - fixed some issues with the AudioToolboxMIDIDevice interface that got broken by yesterday's changes. --- src/sound/i_musicinterns.h | 2 +- src/sound/mididevices/music_audiotoolbox_mididevice.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sound/i_musicinterns.h b/src/sound/i_musicinterns.h index 7f42ef208..6ba405359 100644 --- a/src/sound/i_musicinterns.h +++ b/src/sound/i_musicinterns.h @@ -90,7 +90,7 @@ public: #ifdef _WIN32 MIDIDevice *CreateWinMIDIDevice(int mididevice); #elif defined __APPLE__ -MIDIDevice *CreateAudioToolboxMIDIDevice(int mididevice); +MIDIDevice *CreateAudioToolboxMIDTDevice(); #endif MIDIDevice *CreateTimidityPPMIDIDevice(const char *args); diff --git a/src/sound/mididevices/music_audiotoolbox_mididevice.cpp b/src/sound/mididevices/music_audiotoolbox_mididevice.cpp index 78da42257..6d904a435 100644 --- a/src/sound/mididevices/music_audiotoolbox_mididevice.cpp +++ b/src/sound/mididevices/music_audiotoolbox_mididevice.cpp @@ -56,8 +56,7 @@ private: CFRunLoopTimerRef m_timer = nullptr; MusicTimeStamp m_length = 0; - MidiCallback Callback; - Callback m_callback = nullptr; + MidiCallback m_callback = nullptr; void* m_userData = nullptr; static void TimerCallback(CFRunLoopTimerRef timer, void* info); @@ -312,7 +311,7 @@ void AudioToolboxMIDIDevice::TimerCallback(CFRunLoopTimerRef timer, void* info) if (nullptr != self->m_callback) { - self->m_callback(MIDI_DONE, self->m_userData); + self->m_callback(self->m_userData); } MusicTimeStamp currentTime = 0; @@ -326,9 +325,9 @@ void AudioToolboxMIDIDevice::TimerCallback(CFRunLoopTimerRef timer, void* info) #undef AT_MIDI_CHECK_ERROR -MIDIDevice *CreateAudioToolboxMIDTDevice(int mididevice) +MIDIDevice *CreateAudioToolboxMIDTDevice() { - return new AudioToolboxMIDIDevice(mididevice); + return new AudioToolboxMIDIDevice(); } #endif // __APPLE__