diff options
author | Max Horn | 2003-12-19 01:08:30 +0000 |
---|---|---|
committer | Max Horn | 2003-12-19 01:08:30 +0000 |
commit | 0cddca5f43c5b85d28f2977d783a6cd5cec0d540 (patch) | |
tree | def3a524c684f22a90012665c06a30e4d20d2d68 | |
parent | d21fc5845dc77dd977df22fd9ddc3206bf23a920 (diff) | |
download | scummvm-rg350-0cddca5f43c5b85d28f2977d783a6cd5cec0d540.tar.gz scummvm-rg350-0cddca5f43c5b85d28f2977d783a6cd5cec0d540.tar.bz2 scummvm-rg350-0cddca5f43c5b85d28f2977d783a6cd5cec0d540.zip |
unregister the premix proc when you go away
svn-id: r11755
-rw-r--r-- | sky/music/adlibmusic.cpp | 2 | ||||
-rw-r--r-- | sword1/music.cpp | 4 | ||||
-rw-r--r-- | sword1/music.h | 2 | ||||
-rw-r--r-- | sword2/driver/d_sound.cpp | 1 |
4 files changed, 7 insertions, 2 deletions
diff --git a/sky/music/adlibmusic.cpp b/sky/music/adlibmusic.cpp index bfb48ec01f..1ce6c3aedf 100644 --- a/sky/music/adlibmusic.cpp +++ b/sky/music/adlibmusic.cpp @@ -46,7 +46,7 @@ SkyAdlibMusic::SkyAdlibMusic(SoundMixer *pMixer, SkyDisk *pSkyDisk, OSystem *sys SkyAdlibMusic::~SkyAdlibMusic(void) { - _mixer->setupPremix(NULL, NULL); + _mixer->setupPremix(0, 0); // YM3812Shutdown(); } 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); diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp index c433620ea6..303fcb5893 100644 --- a/sword2/driver/d_sound.cpp +++ b/sword2/driver/d_sound.cpp @@ -140,6 +140,7 @@ Sound::Sound(Sword2Engine *vm) { } Sound::~Sound() { + _vm->_mixer->setupPremix(0, 0); if (_mutex) _vm->_system->delete_mutex(_mutex); } |