mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
AGI: Fix sound deinit. CID 1004128
We really left sound gen leaked with preagi games.
This commit is contained in:
parent
5d7067baaa
commit
4a17b91db2
@ -513,10 +513,7 @@ AgiBase::AgiBase(OSystem *syst, const AGIGameDescription *gameDesc) : Engine(sys
|
||||
AgiBase::~AgiBase() {
|
||||
delete _rnd;
|
||||
|
||||
if (_sound) {
|
||||
_sound->deinitSound();
|
||||
delete _sound;
|
||||
}
|
||||
delete _sound;
|
||||
}
|
||||
|
||||
void AgiBase::initRenderMode() {
|
||||
@ -650,7 +647,6 @@ void AgiEngine::initialize() {
|
||||
_game.sbuf = _game.sbuf16c; // Make sbuf point to the 16 color (+control line & priority info) AGI screen by default
|
||||
|
||||
_gfx->initVideo();
|
||||
_sound->initSound();
|
||||
|
||||
_lastSaveTime = 0;
|
||||
|
||||
|
@ -1334,7 +1334,6 @@ void WinnieEngine::init() {
|
||||
}
|
||||
|
||||
_sound = new SoundMgr(this, _mixer);
|
||||
_sound->initSound();
|
||||
setflag(fSoundOn, true); // enable sound
|
||||
|
||||
memset(&_gameStateWinnie, 0, sizeof(_gameStateWinnie));
|
||||
|
@ -167,16 +167,6 @@ void SoundMgr::stopSound() {
|
||||
_endflag = -1;
|
||||
}
|
||||
|
||||
int SoundMgr::initSound() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
void SoundMgr::deinitSound() {
|
||||
stopSound();
|
||||
|
||||
delete _soundGen;
|
||||
}
|
||||
|
||||
void SoundMgr::soundIsFinished() {
|
||||
if (_endflag != -1)
|
||||
_vm->setflag(_endflag, true);
|
||||
@ -219,6 +209,9 @@ void SoundMgr::setVolume(uint8 volume) {
|
||||
}
|
||||
|
||||
SoundMgr::~SoundMgr() {
|
||||
stopSound();
|
||||
|
||||
delete _soundGen;
|
||||
}
|
||||
|
||||
} // End of namespace Agi
|
||||
|
@ -139,8 +139,6 @@ public:
|
||||
|
||||
void unloadSound(int);
|
||||
void playSound();
|
||||
int initSound();
|
||||
void deinitSound();
|
||||
void startSound(int, int);
|
||||
void stopSound();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user