[Scummvm-git-logs] scummvm master -> 0fd03012665eaa463778a1bebbdf932672b01f15

sev- noreply at scummvm.org
Sat Feb 11 23:53:09 UTC 2023


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b7b34117da DIRECTOR: sound loops can begin on 0
0fd0301266 DIRECTOR: D3 keeps looping sounds


Commit: b7b34117da460ceb0eacca7b55c3f1ccf9af4f8d
    https://github.com/scummvm/scummvm/commit/b7b34117da460ceb0eacca7b55c3f1ccf9af4f8d
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2023-02-12T00:53:05+01:00

Commit Message:
DIRECTOR: sound loops can begin on 0

The logic to determine if a sound is loopable or not didn't consder that
a sound could loop from the beginning. A short song in The Seven Colors
begins at sample 0 and ends at 6456, which was considered non-looping
before this.

Changed paths:
    engines/director/sound.cpp


diff --git a/engines/director/sound.cpp b/engines/director/sound.cpp
index e37a126e2eb..624fc145319 100644
--- a/engines/director/sound.cpp
+++ b/engines/director/sound.cpp
@@ -790,7 +790,7 @@ Audio::AudioStream *SNDDecoder::getAudioStream(bool looping, bool forPuppet, Dis
 }
 
 bool SNDDecoder::hasLoopBounds() {
-	return _loopStart != 0 && _loopEnd != 0;
+	return _loopStart != 0 || _loopEnd != 0;
 }
 
 AudioFileDecoder::AudioFileDecoder(Common::String &path)


Commit: 0fd03012665eaa463778a1bebbdf932672b01f15
    https://github.com/scummvm/scummvm/commit/0fd03012665eaa463778a1bebbdf932672b01f15
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2023-02-12T00:53:05+01:00

Commit Message:
DIRECTOR: D3 keeps looping sounds

Changed paths:
    engines/director/sound.cpp


diff --git a/engines/director/sound.cpp b/engines/director/sound.cpp
index 624fc145319..4c40fd98331 100644
--- a/engines/director/sound.cpp
+++ b/engines/director/sound.cpp
@@ -135,7 +135,9 @@ void DirectorSound::playCastMember(CastMemberID memberID, uint8 soundChannel, bo
 		//   4. maybe more?
 		if (shouldStopOnZero(soundChannel)) {
 			stopSound(soundChannel);
-		} else {
+		// Director 4 will stop after the current loop iteration, but
+		// Director 3 will continue looping until the sound is replaced.
+		} else if (g_director->getVersion() >= 400) {
 			// If there is a loopable stream specified, set the loop to expire by itself
 			if (_channels[soundChannel - 1].loopPtr) {
 				debugC(5, kDebugSound, "DirectorSound::playCastMember(): telling loop in channel %d to stop", soundChannel);




More information about the Scummvm-git-logs mailing list