[Scummvm-git-logs] scummvm master -> 4ce7ae7bf5a9d599f126ce84b399cde49e111156
sluicebox
22204938+sluicebox at users.noreply.github.com
Sat Apr 11 10:09:28 UTC 2020
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:
4ce7ae7bf5 AUDIO: Fix seeking past end of AIFF streams
Commit: 4ce7ae7bf5a9d599f126ce84b399cde49e111156
https://github.com/scummvm/scummvm/commit/4ce7ae7bf5a9d599f126ce84b399cde49e111156
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-04-11T03:06:41-07:00
Commit Message:
AUDIO: Fix seeking past end of AIFF streams
Fixes audio in Mac versions of GK2 and PHANTASMAGORIA1
Changed paths:
audio/decoders/aiff.cpp
diff --git a/audio/decoders/aiff.cpp b/audio/decoders/aiff.cpp
index 253b36dec0..8a9cbd0a96 100644
--- a/audio/decoders/aiff.cpp
+++ b/audio/decoders/aiff.cpp
@@ -159,11 +159,15 @@ RewindableAudioStream *makeAIFFStream(Common::SeekableReadStream *stream, Dispos
break;
}
- stream->seek(pos + length + (length & 1)); // ensure we're also word-aligned
+ uint32 seekPos = pos + length;
+ if (seekPos < stream->size()) {
+ seekPos += (length & 1); // ensure we're word-aligned
+ }
+ stream->seek(seekPos);
}
if (!foundCOMM) {
- warning("makeAIFFStream: Cound not find 'COMM' chunk");
+ warning("makeAIFFStream: Could not find 'COMM' chunk");
if (!dataStream && disposeAfterUse == DisposeAfterUse::YES)
delete stream;
@@ -173,7 +177,7 @@ RewindableAudioStream *makeAIFFStream(Common::SeekableReadStream *stream, Dispos
}
if (!foundSSND) {
- warning("makeAIFFStream: Cound not find 'SSND' chunk");
+ warning("makeAIFFStream: Could not find 'SSND' chunk");
if (disposeAfterUse == DisposeAfterUse::YES)
delete stream;
More information about the Scummvm-git-logs
mailing list