diff options
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/sndres.cpp | 9 | ||||
-rw-r--r-- | engines/saga/sndres.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp index 71044034d7..49d24753a1 100644 --- a/engines/saga/sndres.cpp +++ b/engines/saga/sndres.cpp @@ -104,6 +104,15 @@ SndRes::SndRes(SagaEngine *vm) : _vm(vm), _sfxContext(NULL), _voiceContext(NULL) } } +SndRes::~SndRes() { +#ifdef ENABLE_IHNM + if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) { + // Delete the dummy voice context. See setVoiceBank() + delete _voiceContext; + } +#endif +} + void SndRes::setVoiceBank(int serial) { Common::File *file; if (_voiceSerial == serial) diff --git a/engines/saga/sndres.h b/engines/saga/sndres.h index bc38bed431..979c0288f6 100644 --- a/engines/saga/sndres.h +++ b/engines/saga/sndres.h @@ -39,6 +39,7 @@ class SndRes { public: SndRes(SagaEngine *vm); + ~SndRes(); void playSound(uint32 resourceId, int volume, bool loop); void playVoice(uint32 resourceId); |