aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMax Horn2003-06-11 07:14:39 +0000
committerMax Horn2003-06-11 07:14:39 +0000
commit6f50feb359c9e6e4aaef8a5985eef5f38cd6c5fa (patch)
treeb04be0d4e4565229900584287a8ecf56ea0a960d /sound
parentc117ef1e5082bdd831c2412b20ddeb3b2056ff63 (diff)
downloadscummvm-rg350-6f50feb359c9e6e4aaef8a5985eef5f38cd6c5fa.tar.gz
scummvm-rg350-6f50feb359c9e6e4aaef8a5985eef5f38cd6c5fa.tar.bz2
scummvm-rg350-6f50feb359c9e6e4aaef8a5985eef5f38cd6c5fa.zip
fixed cast warnings
svn-id: r8435
Diffstat (limited to 'sound')
-rw-r--r--sound/mpu401.cpp5
-rw-r--r--sound/mpu401.h6
2 files changed, 6 insertions, 5 deletions
diff --git a/sound/mpu401.cpp b/sound/mpu401.cpp
index 39bfdef482..9a139ec1a1 100644
--- a/sound/mpu401.cpp
+++ b/sound/mpu401.cpp
@@ -115,7 +115,7 @@ MidiChannel *MidiDriver_MPU401::allocateChannel() {
return NULL;
}
-void MidiDriver_MPU401::setTimerCallback (void *timer_param, void (*timer_proc) (void *)) {
+void MidiDriver_MPU401::setTimerCallback (void *timer_param, TimerCallback timer_proc) {
if (!_timer_proc || !timer_proc) {
_timer_proc = timer_proc;
_timer_param = timer_param;
@@ -132,7 +132,6 @@ void MidiDriver_MPU401::setTimerCallback (void *timer_param, void (*timer_proc)
}
#if !defined(__MORPHOS__) && !defined(__PALM_OS__)
-typedef void (*TimerCallback) (void*);
int MidiDriver_MPU401::midi_driver_thread(void *param) {
MidiDriver_MPU401 *mid = (MidiDriver_MPU401 *)param;
@@ -151,7 +150,7 @@ int MidiDriver_MPU401::midi_driver_thread(void *param) {
while (old_time < cur_time) {
old_time += 10;
if (mid->_timer_proc)
- (*(TimerCallback)(mid->_timer_proc)) (mid->_timer_param);
+ (*(mid->_timer_proc)) (mid->_timer_param);
}
}
diff --git a/sound/mpu401.h b/sound/mpu401.h
index a85bb6af0c..592ca67a20 100644
--- a/sound/mpu401.h
+++ b/sound/mpu401.h
@@ -75,10 +75,12 @@ public:
class MidiDriver_MPU401 : public MidiDriver {
private:
+ typedef void (*TimerCallback) (void*);
+
MidiChannel_MPU401 _midi_channels [16];
volatile bool _started_thread;
void *_mutex; // Concurrent shutdown barrier
- volatile void *_timer_proc;
+ volatile TimerCallback _timer_proc;
void *_timer_param;
static int midi_driver_thread (void *param);
@@ -87,7 +89,7 @@ public:
MidiDriver_MPU401();
virtual void close();
- void setTimerCallback(void *timer_param, void (*timer_proc) (void *));
+ void setTimerCallback(void *timer_param, TimerCallback timer_proc);
uint32 getBaseTempo(void) { return 10000; }
MidiChannel *allocateChannel();