[Scummvm-cvs-logs] scummvm master -> 5eaea05a2b6af0ddcf28fca1f0cd3fc0c54f4d07

bluegr bluegr at gmail.com
Thu Jun 23 20:58:29 CEST 2016


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:
5eaea05a2b SCI32: Properly initialize AudioChannel inside Audio32::play()


Commit: 5eaea05a2b6af0ddcf28fca1f0cd3fc0c54f4d07
    https://github.com/scummvm/scummvm/commit/5eaea05a2b6af0ddcf28fca1f0cd3fc0c54f4d07
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-06-23T21:58:13+03:00

Commit Message:
SCI32: Properly initialize AudioChannel inside Audio32::play()

Fixes audio issues caused by uninitialized variables

Changed paths:
    engines/sci/sound/audio32.cpp



diff --git a/engines/sci/sound/audio32.cpp b/engines/sci/sound/audio32.cpp
index def3e4d..c457311 100644
--- a/engines/sci/sound/audio32.cpp
+++ b/engines/sci/sound/audio32.cpp
@@ -561,11 +561,20 @@ uint16 Audio32::play(int16 channelIndex, const ResourceId resourceId, const bool
 	AudioChannel &channel = getChannel(channelIndex);
 	channel.id = resourceId;
 	channel.resource = resource;
+	channel.resourceStream = nullptr;
+	channel.stream = nullptr;
+	channel.converter = nullptr;
+	channel.duration = 0;
+	channel.startedAtTick = 0;
+	channel.pausedAtTick = 0;
 	channel.loop = loop;
-	channel.robot = false;
-	channel.vmd = false;
 	channel.lastFadeTick = 0;
+	channel.fadeVolume = 0;
+	channel.fadeSpeed = 0;
 	channel.fadeStepsRemaining = 0;
+	channel.stopChannelOnFade = false;
+	channel.robot = false;
+	channel.vmd = false;
 	channel.soundNode = soundNode;
 	channel.volume = volume < 0 || volume > kMaxVolume ? (int)kMaxVolume : volume;
 	// TODO: SCI3 introduces stereo audio






More information about the Scummvm-git-logs mailing list