[Scummvm-cvs-logs] SF.net SVN: scummvm: [25225] scummvm/trunk/engines/agi/sound.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sat Jan 27 06:23:57 CET 2007
Revision: 25225
http://scummvm.svn.sourceforge.net/scummvm/?rev=25225&view=rev
Author: eriktorbjorn
Date: 2007-01-26 21:23:56 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
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?
Modified Paths:
--------------
scummvm/trunk/engines/agi/sound.cpp
Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp 2007-01-27 02:30:17 UTC (rev 25224)
+++ scummvm/trunk/engines/agi/sound.cpp 2007-01-27 05:23:56 UTC (rev 25225)
@@ -332,11 +332,14 @@
/*loadInstruments("demo.sys"); */
#endif
+ _mixer->setupPremix(this);
+
return r;
}
void SoundMgr::deinitSound() {
debugC(3, kDebugLevelSound, "()");
+ _mixer->setupPremix(NULL);
free(sndBuffer);
}
@@ -714,7 +717,6 @@
_vm = agi;
_mixer = pMixer;
_sampleRate = pMixer->getOutputRate();
- _mixer->setupPremix(this);
}
void SoundMgr::premixerCall(int16 *data, uint len) {
@@ -726,7 +728,6 @@
}
SoundMgr::~SoundMgr() {
- _mixer->setupPremix(NULL);
}
} // End of namespace Agi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list