diff options
-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); } |