mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 21:51:09 +00:00
- fixed some issues with the AudioToolboxMIDIDevice interface that got broken by yesterday's changes.
This commit is contained in:
parent
d868f79413
commit
7d6cd2ac83
2 changed files with 5 additions and 6 deletions
|
@ -90,7 +90,7 @@ public:
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
MIDIDevice *CreateWinMIDIDevice(int mididevice);
|
MIDIDevice *CreateWinMIDIDevice(int mididevice);
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
MIDIDevice *CreateAudioToolboxMIDIDevice(int mididevice);
|
MIDIDevice *CreateAudioToolboxMIDTDevice();
|
||||||
#endif
|
#endif
|
||||||
MIDIDevice *CreateTimidityPPMIDIDevice(const char *args);
|
MIDIDevice *CreateTimidityPPMIDIDevice(const char *args);
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,7 @@ private:
|
||||||
CFRunLoopTimerRef m_timer = nullptr;
|
CFRunLoopTimerRef m_timer = nullptr;
|
||||||
MusicTimeStamp m_length = 0;
|
MusicTimeStamp m_length = 0;
|
||||||
|
|
||||||
MidiCallback Callback;
|
MidiCallback m_callback = nullptr;
|
||||||
Callback m_callback = nullptr;
|
|
||||||
void* m_userData = nullptr;
|
void* m_userData = nullptr;
|
||||||
|
|
||||||
static void TimerCallback(CFRunLoopTimerRef timer, void* info);
|
static void TimerCallback(CFRunLoopTimerRef timer, void* info);
|
||||||
|
@ -312,7 +311,7 @@ void AudioToolboxMIDIDevice::TimerCallback(CFRunLoopTimerRef timer, void* info)
|
||||||
|
|
||||||
if (nullptr != self->m_callback)
|
if (nullptr != self->m_callback)
|
||||||
{
|
{
|
||||||
self->m_callback(MIDI_DONE, self->m_userData);
|
self->m_callback(self->m_userData);
|
||||||
}
|
}
|
||||||
|
|
||||||
MusicTimeStamp currentTime = 0;
|
MusicTimeStamp currentTime = 0;
|
||||||
|
@ -326,9 +325,9 @@ void AudioToolboxMIDIDevice::TimerCallback(CFRunLoopTimerRef timer, void* info)
|
||||||
|
|
||||||
#undef AT_MIDI_CHECK_ERROR
|
#undef AT_MIDI_CHECK_ERROR
|
||||||
|
|
||||||
MIDIDevice *CreateAudioToolboxMIDTDevice(int mididevice)
|
MIDIDevice *CreateAudioToolboxMIDTDevice()
|
||||||
{
|
{
|
||||||
return new AudioToolboxMIDIDevice(mididevice);
|
return new AudioToolboxMIDIDevice();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
|
Loading…
Reference in a new issue