aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-01-27 05:23:56 +0000
committerTorbjörn Andersson2007-01-27 05:23:56 +0000
commit0fdd4b6481617b6c865d1dff9deeb9d0cb006079 (patch)
tree5e38a554079c5a6a67971036a936df689684a55c /engines/agi
parent3c8b67f3cfdd2e595d03acef618017b1d996649d (diff)
downloadscummvm-rg350-0fdd4b6481617b6c865d1dff9deeb9d0cb006079.tar.gz
scummvm-rg350-0fdd4b6481617b6c865d1dff9deeb9d0cb006079.tar.bz2
scummvm-rg350-0fdd4b6481617b6c865d1dff9deeb9d0cb006079.zip
Moved the setupPremix() calls to initSound() and deinitSound(), instead of the
sound manager's constructor/destructor. Maybe this will fix the rare crashes on startup? svn-id: r25225
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/sound.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 1c8ece04fa..4d334dfd07 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -332,11 +332,14 @@ int SoundMgr::initSound() {
/*loadInstruments("demo.sys"); */
#endif
+ _mixer->setupPremix(this);
+
return r;
}
void SoundMgr::deinitSound() {
debugC(3, kDebugLevelSound, "()");
+ _mixer->setupPremix(NULL);
free(sndBuffer);
}
@@ -714,7 +717,6 @@ SoundMgr::SoundMgr(AgiEngine *agi, Audio::Mixer *pMixer) {
_vm = agi;
_mixer = pMixer;
_sampleRate = pMixer->getOutputRate();
- _mixer->setupPremix(this);
}
void SoundMgr::premixerCall(int16 *data, uint len) {
@@ -726,7 +728,6 @@ void SoundMgr::setVolume(uint8 volume) {
}
SoundMgr::~SoundMgr() {
- _mixer->setupPremix(NULL);
}
} // End of namespace Agi