aboutsummaryrefslogtreecommitdiff
path: root/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp')
-rw-r--r--sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp b/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
index 82d0bd0438..6d52937cc6 100644
--- a/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
+++ b/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
@@ -1037,11 +1037,21 @@ TownsPC98_AudioDriver::TownsPC98_AudioDriver(Audio::Mixer *mixer, EmuType type)
_musicPlaying(false), _sfxPlaying(false), _fading(false), _looping(0), _ready(false) {
_sfxOffsets[0] = _sfxOffsets[1] = 0;
+
+ setTimerCallbackA((ChipTimerProc)&TownsPC98_AudioDriver::timerCallbackA);
+ setTimerCallbackB((ChipTimerProc)&TownsPC98_AudioDriver::timerCallbackB);
}
TownsPC98_AudioDriver::~TownsPC98_AudioDriver() {
+ Common::StackLock lock(_mutex);
+
reset();
+ _ready = false;
+
+ setTimerCallbackA();
+ setTimerCallbackB();
+
if (_channels) {
for (int i = 0; i < _numChan; i++)
delete _channels[i];