aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorMax Horn2003-12-19 01:08:30 +0000
committerMax Horn2003-12-19 01:08:30 +0000
commit0cddca5f43c5b85d28f2977d783a6cd5cec0d540 (patch)
treedef3a524c684f22a90012665c06a30e4d20d2d68 /sword1
parentd21fc5845dc77dd977df22fd9ddc3206bf23a920 (diff)
downloadscummvm-rg350-0cddca5f43c5b85d28f2977d783a6cd5cec0d540.tar.gz
scummvm-rg350-0cddca5f43c5b85d28f2977d783a6cd5cec0d540.tar.bz2
scummvm-rg350-0cddca5f43c5b85d28f2977d783a6cd5cec0d540.zip
unregister the premix proc when you go away
svn-id: r11755
Diffstat (limited to 'sword1')
-rw-r--r--sword1/music.cpp4
-rw-r--r--sword1/music.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/sword1/music.cpp b/sword1/music.cpp
index 5ed0b8e568..8926eb8d46 100644
--- a/sword1/music.cpp
+++ b/sword1/music.cpp
@@ -40,6 +40,10 @@ SwordMusic::SwordMusic(OSystem *system, SoundMixer *pMixer) {
assert(_mixer->getOutputRate() == 22050);
}
+SwordMusic::~SwordMusic() {
+ _mixer->setupPremix(0, 0);
+}
+
void SwordMusic::passMixerFunc(void *param, int16 *buf, uint len) {
((SwordMusic*)param)->mixer(buf, len);
}
diff --git a/sword1/music.h b/sword1/music.h
index d55e96f432..f273faf7cc 100644
--- a/sword1/music.h
+++ b/sword1/music.h
@@ -32,11 +32,11 @@
#define WAVEHEADERSIZE 0x2C
class SoundMixer;
-//class File;
class SwordMusic {
public:
SwordMusic(OSystem *system, SoundMixer *pMixer);
+ ~SwordMusic();
void stream(void);
void startMusic(int32 tuneId, int32 loopFlag);
void fadeDown(void);