diff options
author | Filippos Karapetis | 2016-06-25 17:42:19 +0300 |
---|---|---|
committer | Filippos Karapetis | 2016-06-25 17:42:19 +0300 |
commit | 2e58e6d09f7350c60d5e35e30dd418ef62c7fa4b (patch) | |
tree | abb2c1e1df51eefcb8b2855bf3e54ac5509a8210 /engines/sci/sound | |
parent | 5ffafbb9b86b0a9d2303392333a9f6c77f2e30f9 (diff) | |
download | scummvm-rg350-2e58e6d09f7350c60d5e35e30dd418ef62c7fa4b.tar.gz scummvm-rg350-2e58e6d09f7350c60d5e35e30dd418ef62c7fa4b.tar.bz2 scummvm-rg350-2e58e6d09f7350c60d5e35e30dd418ef62c7fa4b.zip |
SCI32: Properly initialize pausedAtTick inside Audio32::play()
Fixes audio not playing in later SCI32 games that use Audio32
Diffstat (limited to 'engines/sci/sound')
-rw-r--r-- | engines/sci/sound/audio32.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/sci/sound/audio32.cpp b/engines/sci/sound/audio32.cpp index def3e4d838..7958a6f9d7 100644 --- a/engines/sci/sound/audio32.cpp +++ b/engines/sci/sound/audio32.cpp @@ -561,11 +561,14 @@ uint16 Audio32::play(int16 channelIndex, const ResourceId resourceId, const bool AudioChannel &channel = getChannel(channelIndex); channel.id = resourceId; channel.resource = resource; + // resourceStream, stream, converter, duration and startedAtTick will be initialized below + channel.pausedAtTick = 0; channel.loop = loop; - channel.robot = false; - channel.vmd = false; channel.lastFadeTick = 0; channel.fadeStepsRemaining = 0; + // fadeVolume, fadeSpeed and stopChannelOnFade will be initialized once they are actually used + channel.robot = false; + channel.vmd = false; channel.soundNode = soundNode; channel.volume = volume < 0 || volume > kMaxVolume ? (int)kMaxVolume : volume; // TODO: SCI3 introduces stereo audio |