aboutsummaryrefslogtreecommitdiff
path: root/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp')
-rw-r--r--sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp b/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
index 241b9bde50..e304537c22 100644
--- a/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
+++ b/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
@@ -835,6 +835,7 @@ TownsPC98_FmSynth::TownsPC98_FmSynth(Audio::Mixer *mixer, EmuType type) :
memset(&_timers[0], 0, sizeof(ChipTimer));
memset(&_timers[1], 0, sizeof(ChipTimer));
+
_timers[0].cb = &TownsPC98_FmSynth::timerCallbackA;
_timers[1].cb = &TownsPC98_FmSynth::timerCallbackB;
_timerbase = (uint32)(_baserate * 1000000.0f);
@@ -842,6 +843,9 @@ TownsPC98_FmSynth::TownsPC98_FmSynth(Audio::Mixer *mixer, EmuType type) :
TownsPC98_FmSynth::~TownsPC98_FmSynth() {
Common::StackLock lock(_mutex);
+
+ _ready = false;
+
_mixer->stopHandle(_soundHandle);
delete _ssg;
delete _prc;
@@ -1154,6 +1158,14 @@ int TownsPC98_FmSynth::readBuffer(int16 *buffer, const int numSamples) {
return numSamples;
}
+void TownsPC98_FmSynth::setTimerCallbackA(ChipTimerProc proc) {
+ _timers[0].cb = proc;
+}
+
+void TownsPC98_FmSynth::setTimerCallbackB(ChipTimerProc proc) {
+ _timers[1].cb = proc;
+}
+
uint8 TownsPC98_FmSynth::readSSGStatus() {
return _ssg->chanEnable();
}