[Scummvm-cvs-logs] SF.net SVN: scummvm:[52741] scummvm/trunk/engines/agi/sound_pcjr.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Thu Sep 16 06:43:50 CEST 2010
Revision: 52741
http://scummvm.svn.sourceforge.net/scummvm/?rev=52741&view=rev
Author: eriktorbjorn
Date: 2010-09-16 04:43:49 +0000 (Thu, 16 Sep 2010)
Log Message:
-----------
AGI: Initialise PCjr emulator channels on creation
Because chanGen() gets called very early, and sometimes it crashes
ScummVM as soon as the game starts. Actually, it's probably enough to
initialise a couple of fields in _tchannel[], but I figured it
couldn't hurt to clear all of _channel[] and _tchannel[].
Modified Paths:
--------------
scummvm/trunk/engines/agi/sound_pcjr.cpp
Modified: scummvm/trunk/engines/agi/sound_pcjr.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound_pcjr.cpp 2010-09-15 23:25:46 UTC (rev 52740)
+++ scummvm/trunk/engines/agi/sound_pcjr.cpp 2010-09-16 04:43:49 UTC (rev 52741)
@@ -125,6 +125,9 @@
_dissolveMethod = 3;
+ memset(_channel, 0, sizeof(_channel));
+ memset(_tchannel, 0, sizeof(_tchannel));
+
_mixer->playStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
@@ -158,7 +161,7 @@
void SoundGenPCJr::stop(void) {
int i;
- for (i = 0; i < CHAN_MAX ; i++) {
+ for (i = 0; i < CHAN_MAX; i++) {
_channel[i].avail = 0;
_tchannel[i].avail = 0;
}
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