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__