[Scummvm-tracker] [ScummVM :: Bugs] #12513: MOHAWK: Static in Myst Sounds (GOG ME Release)
ScummVM :: Bugs
trac at scummvm.org
Thu May 20 16:36:50 UTC 2021
#12513: MOHAWK: Static in Myst Sounds (GOG ME Release)
---------------------+-----------------------------
Reporter: squigley | Owner: digitall
Type: defect | Status: new
Priority: normal | Component: Engine: Mohawk
Version: | Resolution:
Keywords: | Game: Myst
---------------------+-----------------------------
Comment (by eriktorbjorn):
As an experiment, I made the following change to my local copy:
{{{
diff --git a/audio/decoders/wave.cpp b/audio/decoders/wave.cpp
index 67e0b31d83..c34cc3f64d 100644
--- a/audio/decoders/wave.cpp
+++ b/audio/decoders/wave.cpp
@@ -205,7 +205,7 @@ SeekableAudioStream
*makeWAVStream(Common::SeekableReadStream *stream, DisposeAf
size &= ~(sampleSize - 1);
}
}
- Common::SeekableReadStream *dataStream = new
Common::SeekableSubReadStream(stream, stream->pos(), stream->pos() + size,
disposeAfterUse);
+ Common::SeekableReadStream *dataStream = new
Common::SafeSeekableSubReadStream(stream, stream->pos(), stream->pos() +
size, disposeAfterUse);
switch (type) {
case kWaveFormatMSIMAADPCM:
}}}
This seems to fix the problem. My only guess is that the different sound
resources point to the same file, and using the plain
SeekableSubReadStream you can't be sure if the stream is still pointing to
the correct position when it resumes playing a sound.
But I'm not at all sure.
--
Ticket URL: <https://bugs.scummvm.org/ticket/12513#comment:9>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list