aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/fmtowns_pc98
diff options
context:
space:
mode:
Diffstat (limited to 'audio/softsynth/fmtowns_pc98')
-rw-r--r--audio/softsynth/fmtowns_pc98/pc98_audio.cpp2
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_audio.cpp2
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp3
3 files changed, 3 insertions, 4 deletions
diff --git a/audio/softsynth/fmtowns_pc98/pc98_audio.cpp b/audio/softsynth/fmtowns_pc98/pc98_audio.cpp
index c8d58f6923..9ab1ec7659 100644
--- a/audio/softsynth/fmtowns_pc98/pc98_audio.cpp
+++ b/audio/softsynth/fmtowns_pc98/pc98_audio.cpp
@@ -80,9 +80,9 @@ PC98AudioCoreInternal::PC98AudioCoreInternal(Audio::Mixer *mixer, PC98AudioCore
}
PC98AudioCoreInternal::~PC98AudioCoreInternal() {
+ deinit();
Common::StackLock lock(_mutex);
_ready = false;
- deinit();
/*
diff --git a/audio/softsynth/fmtowns_pc98/towns_audio.cpp b/audio/softsynth/fmtowns_pc98/towns_audio.cpp
index 1464dd73b7..58a3a804f9 100644
--- a/audio/softsynth/fmtowns_pc98/towns_audio.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_audio.cpp
@@ -404,9 +404,9 @@ TownsAudioInterfaceInternal::TownsAudioInterfaceInternal(Audio::Mixer *mixer, To
}
TownsAudioInterfaceInternal::~TownsAudioInterfaceInternal() {
+ deinit();
Common::StackLock lock(_mutex);
_ready = false;
- deinit();
delete[] _fmSaveReg[0];
delete[] _fmSaveReg[1];
diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
index 178d33ef72..0cdf18378d 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
@@ -1347,9 +1347,8 @@ int TownsPC98_FmSynth::getRate() const {
}
void TownsPC98_FmSynth::deinit() {
- Common::StackLock lock(_mutex);
- _ready = false;
_mixer->stopHandle(_soundHandle);
+ _ready = false;
_timers[0].cb = _timers[1].cb = &TownsPC98_FmSynth::idleTimerCallback;
}