[Scummvm-cvs-logs] scummvm master -> a1c4203fe858f0ef0a227cc87d61aea2fe51f80f
Strangerke
Strangerke at scummvm.org
Mon Apr 29 09:37:01 CEST 2013
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a1c4203fe8 TSAGE: Fix some non-initialized variables. CID 1002367, 1002368, 1002369, 1002370
Commit: a1c4203fe858f0ef0a227cc87d61aea2fe51f80f
https://github.com/scummvm/scummvm/commit/a1c4203fe858f0ef0a227cc87d61aea2fe51f80f
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-04-29T00:35:44-07:00
Commit Message:
TSAGE: Fix some non-initialized variables. CID 1002367, 1002368, 1002369, 1002370
Changed paths:
engines/tsage/sound.cpp
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index 69a9975..b9567ce 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -1494,6 +1494,11 @@ Sound::Sound() {
memset(_trkLoopIndex, 0, SOUND_ARR_SIZE * sizeof(int));
memset(_trkRest, 0, SOUND_ARR_SIZE * sizeof(int));
memset(_trkLoopRest, 0, SOUND_ARR_SIZE * sizeof(int));
+ for (int i = 0; i < 16; i++) {
+ _chWork[i] = false;
+ _trackInfo._chunks[i] = 0;
+ _trackInfo._voiceTypes[i] = 0;
+ }
}
Sound::~Sound() {
@@ -2504,6 +2509,7 @@ SoundDriver::SoundDriver() {
_driverResID = 0;
_minVersion = _maxVersion = 0;
_groupMask = 0;
+ _groupOffset = NULL;
}
/*--------------------------------------------------------------------------*/
@@ -2568,6 +2574,12 @@ AdlibSoundDriver::AdlibSoundDriver(): SoundDriver() {
Common::fill(_pitchBlend, _pitchBlend + ADLIB_CHANNEL_COUNT, 0x2000);
memset(_v4409E, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
_patchData = NULL;
+ for (int i = 0; i < 256; i++)
+ _portContents[i] = 0;
+ for (int i = 0; i < 9; i++) {
+ _channelVoiced[i] = false;
+ _pitchBlend[i] = 0;
+ }
}
AdlibSoundDriver::~AdlibSoundDriver() {
@@ -2862,6 +2874,7 @@ SoundBlasterDriver::SoundBlasterDriver(): SoundDriver() {
_sampleRate = _mixer->getOutputRate();
_audioStream = NULL;
_channelData = NULL;
+ _channelVolume = 0;
}
SoundBlasterDriver::~SoundBlasterDriver() {
More information about the Scummvm-git-logs
mailing list