From c2c9ab9a224147d6d347180c9d255bdabd560ae7 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Tue, 21 Aug 2007 15:51:28 +0000 Subject: An encountered zero in an Apple IIGS sample stream turns off looping for that stream. Implemented this. svn-id: r28688 --- engines/agi/sound.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines') diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp index da5a18330c..63d204f98e 100644 --- a/engines/agi/sound.cpp +++ b/engines/agi/sound.cpp @@ -157,6 +157,10 @@ bool IIgsWaveInfo::finalize(Common::SeekableReadStream &uint8Wave) { for (uint i = 0; i < size; i++) { if (uint8Wave.readByte() == 0) { trueSize = i; + // A zero in the sample stream turns off looping + // (At least that's what MESS 0.117 and KEGS32 0.91 seem to do) + if (mode == OSC_MODE_LOOP) + mode = OSC_MODE_ONESHOT; break; } } -- cgit v1.2.3