mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 20:59:00 +00:00
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
This commit is contained in:
parent
3c8b67f3cf
commit
0fdd4b6481
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user