aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-10-18 13:04:59 +0000
committerMax Horn2003-10-18 13:04:59 +0000
commit7eab653832b85f8da29ab4dab50f28948d040e37 (patch)
tree1c2f08ede084b491f7fd517fae22382e0b3ec2b7
parent1a8397a475479827b72b9423e6c9eedb8763746d (diff)
downloadscummvm-rg350-7eab653832b85f8da29ab4dab50f28948d040e37.tar.gz
scummvm-rg350-7eab653832b85f8da29ab4dab50f28948d040e37.tar.bz2
scummvm-rg350-7eab653832b85f8da29ab4dab50f28948d040e37.zip
cleanup
svn-id: r10894
-rw-r--r--backends/midi/adlib.cpp6
-rw-r--r--backends/midi/ym2612.cpp6
-rw-r--r--sound/mididrv.h3
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