- fixed some issues with the AudioToolboxMIDIDevice interface that got broken by yesterday's changes.

This commit is contained in:
Christoph Oelckers 2017-03-11 18:16:05 +01:00
parent d868f79413
commit 7d6cd2ac83
2 changed files with 5 additions and 6 deletions

View file

@ -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);

View file

@ -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__