aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorFlorian Kagerer2009-09-16 20:42:10 +0000
committerFlorian Kagerer2009-09-16 20:42:10 +0000
commit361fd53ef3804773a17ef243dc7edc8a6a5f22ee (patch)
tree1c9791b745d799c32cf30b29469ff34e91c1fa10 /engines/kyra
parent811596fde2cc1e84d02892a082b5056f7d8a6b84 (diff)
downloadscummvm-rg350-361fd53ef3804773a17ef243dc7edc8a6a5f22ee.tar.gz
scummvm-rg350-361fd53ef3804773a17ef243dc7edc8a6a5f22ee.tar.bz2
scummvm-rg350-361fd53ef3804773a17ef243dc7edc8a6a5f22ee.zip
Kyra/LoL: fix pc98 audio driver destructor
svn-id: r44117
Diffstat (limited to 'engines/kyra')
-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;