aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/sound_towns.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 27c962b8c9..448b598bf6 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -1622,6 +1622,9 @@ protected:
virtual void timerCallbackA() = 0;
virtual void timerCallbackB() = 0;
+ void lock() { _mutex.lock(); }
+ void unlock() { _mutex.unlock(); }
+
const int _numChan;
const int _numSSG;
const bool _hasPercussion;
@@ -1630,6 +1633,8 @@ private:
void nextTick(int32 *buffer, uint32 bufferSize);
void generateOutput(int32 &leftSample, int32 &rightSample, int32 *del, int32 *feed);
+ Common::Mutex _mutex;
+
struct ChanInternal {
uint16 frqTemp;
bool enableLeft;
@@ -1715,16 +1720,11 @@ protected:
void setMusicTempo(uint8 tempo);
void setSfxTempo(uint16 tempo);
- void lock() { _mutex.lock(); }
- void unlock() { _mutex.unlock(); }
-
TownsPC98_OpnChannel **_channels;
TownsPC98_OpnChannelSSG **_ssgChannels;
TownsPC98_OpnSfxChannel **_sfxChannels;
TownsPC98_OpnChannelPCM *_rhythmChannel;
- Common::Mutex _mutex;
-
const uint8 *_opnCarrier;
const uint8 *_opnFreqTable;
const uint8 *_opnFreqTableSSG;
@@ -2941,6 +2941,7 @@ TownsPC98_OpnCore::TownsPC98_OpnCore(Audio::Mixer *mixer, OpnType type) :
}
TownsPC98_OpnCore::~TownsPC98_OpnCore() {
+ _mixer->stopHandle(_soundHandle);
delete _ssg;
delete _prc;
delete[] _chanInternal;