From 7eab653832b85f8da29ab4dab50f28948d040e37 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 18 Oct 2003 13:04:59 +0000 Subject: cleanup svn-id: r10894 --- backends/midi/adlib.cpp | 6 +++--- backends/midi/ym2612.cpp | 6 +++--- sound/mididrv.h | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/backends/midi/adlib.cpp b/backends/midi/adlib.cpp index 8cde3a0b6e..8eebde5240 100644 --- a/backends/midi/adlib.cpp +++ b/backends/midi/adlib.cpp @@ -561,7 +561,7 @@ public: void setPitchBendRange(byte channel, uint range); void sysEx_customInstrument(byte channel, uint32 type, byte *instr); - void setTimerCallback(void *timer_param, void (*timer_proc) (void *)); + void setTimerCallback(void *timer_param, TimerProc timer_proc); uint32 getBaseTempo() { return 1000000 / BASE_FREQ; } @@ -970,8 +970,8 @@ void MidiDriver_ADLIB::sysEx_customInstrument(byte channel, uint32 type, byte *i _parts[channel].sysEx_customInstrument(type, instr); } -void MidiDriver_ADLIB::setTimerCallback(void *timer_param, void (*timer_proc) (void *)) { - _timer_proc = (TimerCallback *) timer_proc; +void MidiDriver_ADLIB::setTimerCallback(void *timer_param, TimerProc timer_proc) { + _timer_proc = timer_proc; _timer_param = timer_param; } diff --git a/backends/midi/ym2612.cpp b/backends/midi/ym2612.cpp index 0b1eb28c9f..f90c330aba 100644 --- a/backends/midi/ym2612.cpp +++ b/backends/midi/ym2612.cpp @@ -193,7 +193,7 @@ public: void setPitchBendRange(byte channel, uint range) { } void sysEx(byte *msg, uint16 length); - void setTimerCallback(void *timer_param, void (*timer_proc)(void *)); + void setTimerCallback(void *timer_param, TimerProc timer_proc); uint32 getBaseTempo() { return 1000000 / BASE_FREQ; } MidiChannel *allocateChannel() { return 0; } @@ -770,8 +770,8 @@ void MidiDriver_YM2612::close() { _mixer->setupPremix(0, 0); } -void MidiDriver_YM2612::setTimerCallback(void *timer_param, void (*timer_proc)(void *)) { - _timer_proc = (TimerCallback *) timer_proc; +void MidiDriver_YM2612::setTimerCallback(void *timer_param, TimerProc timer_proc) { + _timer_proc = timer_proc; _timer_param = timer_param; } diff --git a/sound/mididrv.h b/sound/mididrv.h index e67643b36a..4cc9bf947e 100644 --- a/sound/mididrv.h +++ b/sound/mididrv.h @@ -24,6 +24,7 @@ #define SOUND_MIDIDRV_H #include "common/scummsys.h" +#include "common/timer.h" class MidiChannel; class SoundMixer; @@ -123,7 +124,7 @@ public: virtual void metaEvent (byte type, byte*data, uint16 length) { } // Timing functions - MidiDriver now operates timers - virtual void setTimerCallback (void *timer_param, void (*timer_proc) (void *)) = 0; + virtual void setTimerCallback (void *timer_param, TimerProc timer_proc) = 0; virtual uint32 getBaseTempo (void) = 0; // Channel allocation functions -- cgit v1.2.3