diff options
author | Strangerke | 2013-04-29 09:35:44 +0200 |
---|---|---|
committer | Strangerke | 2013-04-29 09:35:44 +0200 |
commit | a1c4203fe858f0ef0a227cc87d61aea2fe51f80f (patch) | |
tree | 208a2df3ca6cd1d6b1c80bc038f14b485528c24a /engines | |
parent | 4a8b0866c4ff268ffe8b8088689a300f23ad2a25 (diff) | |
download | scummvm-rg350-a1c4203fe858f0ef0a227cc87d61aea2fe51f80f.tar.gz scummvm-rg350-a1c4203fe858f0ef0a227cc87d61aea2fe51f80f.tar.bz2 scummvm-rg350-a1c4203fe858f0ef0a227cc87d61aea2fe51f80f.zip |
TSAGE: Fix some non-initialized variables. CID 1002367, 1002368, 1002369, 1002370
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/sound.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp index 69a9975ef4..b9567cece2 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() { |