aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/sound.cpp
diff options
context:
space:
mode:
authorKari Salminen2007-08-21 15:51:28 +0000
committerKari Salminen2007-08-21 15:51:28 +0000
commitc2c9ab9a224147d6d347180c9d255bdabd560ae7 (patch)
treeb3ed8116d40dec27f9c91104cbdabe022e17e4b1 /engines/agi/sound.cpp
parent44f73a1b7cab5b145c5c74347f8b761d6fdfe2be (diff)
downloadscummvm-rg350-c2c9ab9a224147d6d347180c9d255bdabd560ae7.tar.gz
scummvm-rg350-c2c9ab9a224147d6d347180c9d255bdabd560ae7.tar.bz2
scummvm-rg350-c2c9ab9a224147d6d347180c9d255bdabd560ae7.zip
An encountered zero in an Apple IIGS sample stream turns off looping for that stream. Implemented this.
svn-id: r28688
Diffstat (limited to 'engines/agi/sound.cpp')
-rw-r--r--engines/agi/sound.cpp4
1 files changed, 4 insertions, 0 deletions
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;
}
}