diff options
author | Max Horn | 2008-01-05 20:59:33 +0000 |
---|---|---|
committer | Max Horn | 2008-01-05 20:59:33 +0000 |
commit | 3f6b2c97b7c406ffc2c81892a008053f5ebd38bd (patch) | |
tree | 0153f2765fa928536634943a23786858a0aae6b5 /engines/scumm/imuse_digi/dimuse_track.cpp | |
parent | 1f364f54e7fb78d020ccf409b26c8f18a9d5161c (diff) | |
download | scummvm-rg350-3f6b2c97b7c406ffc2c81892a008053f5ebd38bd.tar.gz scummvm-rg350-3f6b2c97b7c406ffc2c81892a008053f5ebd38bd.tar.bz2 scummvm-rg350-3f6b2c97b7c406ffc2c81892a008053f5ebd38bd.zip |
When loading and before starting an iMuse Digitial track, reset it completely to zero
svn-id: r30262
Diffstat (limited to 'engines/scumm/imuse_digi/dimuse_track.cpp')
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index 0f1cd8ba8e..7dff90b65a 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -92,24 +92,17 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, } Track *track = _track[l]; + + // Reset the track + memset(track, 0, sizeof(Track)); track->pan = 64; track->vol = volume * 1000; - track->volFadeDest = 0; - track->volFadeStep = 0; - track->volFadeDelay = 0; - track->volFadeUsed = false; track->soundId = soundId; - track->mixerStreamRunning = false; track->volGroupId = volGroupId; track->curHookId = hookId; track->soundPriority = priority; track->curRegion = -1; - track->dataOffset = 0; - track->regionOffset = 0; - track->dataMod12Bit = 0; - track->mixerFlags = 0; - track->toBeRemoved = false; track->soundType = soundType; int bits = 0, freq = 0, channels = 0; @@ -117,11 +110,7 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, track->souStreamUsed = (input != 0); if (track->souStreamUsed) { - track->feedSize = 0; - track->soundName[0] = 0; - track->soundDesc = NULL; track->streamSou = input; - track->stream = NULL; track->mixerStreamRunning = false; } else { strcpy(track->soundName, soundName); @@ -177,7 +166,6 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, if (track->volGroupId == 3) type = Audio::Mixer::kMusicSoundType; - track->streamSou = NULL; track->stream = Audio::makeAppendableAudioStream(freq, makeMixerFlags(track->mixerFlags)); _mixer->playInputStream(type, &track->mixChanHandle, track->stream, -1, vol, pan, false); track->mixerStreamRunning = true; |