aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJamieson Christian2003-09-27 23:59:00 +0000
committerJamieson Christian2003-09-27 23:59:00 +0000
commit4dcb829e78f969a4e492e9e777b51715c1309e9e (patch)
tree7ebaef54d2b07297d00f019e0370876ae8c645d7 /sound
parent072bf0f47626bfb4122b95605426eff3c8d23eb0 (diff)
downloadscummvm-rg350-4dcb829e78f969a4e492e9e777b51715c1309e9e.tar.gz
scummvm-rg350-4dcb829e78f969a4e492e9e777b51715c1309e9e.tar.bz2
scummvm-rg350-4dcb829e78f969a4e492e9e777b51715c1309e9e.zip
Timer services are now available through g_timer, so
you don't have to go through the Engine to get to them. svn-id: r10450
Diffstat (limited to 'sound')
-rw-r--r--sound/mpu401.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/mpu401.cpp b/sound/mpu401.cpp
index 0b34ed0f7c..e11963048d 100644
--- a/sound/mpu401.cpp
+++ b/sound/mpu401.cpp
@@ -24,6 +24,7 @@
#include "common/timer.h"
#include "common/util.h" // for ARRAYSIZE
+extern Timer *g_timer;
void MidiChannel_MPU401::init(MidiDriver_MPU401 *owner, byte channel) {
_owner = owner;
@@ -94,9 +95,8 @@ MidiDriver_MPU401::MidiDriver_MPU401() :
}
void MidiDriver_MPU401::close() {
- // FIXME: I'd really prefer a g_timer instead of going through g_engine
if (_timer_proc)
- g_engine->_timer->releaseProcedure (_timer_proc);
+ g_timer->releaseProcedure (_timer_proc);
_timer_proc = 0;
for (int i = 0; i < 16; ++i)
send (0x7B << 8 | 0xB0 | i);
@@ -129,12 +129,11 @@ MidiChannel *MidiDriver_MPU401::allocateChannel() {
}
void MidiDriver_MPU401::setTimerCallback (void *timer_param, TimerProc timer_proc) {
- // FIXME: I'd really prefer a g_timer instead of going through g_engine
if (!_timer_proc || !timer_proc) {
if (_timer_proc)
- g_engine->_timer->releaseProcedure (_timer_proc);
+ g_timer->releaseProcedure (_timer_proc);
_timer_proc = timer_proc;
if (timer_proc)
- g_engine->_timer->installProcedure (timer_proc, 10000, timer_param);
+ g_timer->installProcedure (timer_proc, 10000, timer_param);
}
}