aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-09-05 22:53:36 +0000
committerMax Horn2003-09-05 22:53:36 +0000
commit318daabdc771eabf040df1a15f5abab096ac0f78 (patch)
tree819e26073236a44fc2c8775ce01905e961934db5
parent0cff89b779315c392deeaebae8a3c763473a074c (diff)
downloadscummvm-rg350-318daabdc771eabf040df1a15f5abab096ac0f78.tar.gz
scummvm-rg350-318daabdc771eabf040df1a15f5abab096ac0f78.tar.bz2
scummvm-rg350-318daabdc771eabf040df1a15f5abab096ac0f78.zip
added whitespace, added FIXME comment
svn-id: r10026
-rw-r--r--scumm/sound.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 6998877947..32d4f07f7b 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -446,8 +446,8 @@ void Sound::playSound(int soundID) {
if ((_scumm->_features & GF_AMIGA) && (READ_BE_UINT16(ptr + 16) || READ_BE_UINT16(ptr + 6))) {
// the first check is for pitch-bending looped sounds (i.e. "pouring liquid", "biplane dive", etc.)
// the second check is for simple looped sounds
- int loopStart = READ_BE_UINT16(ptr + 10) - READ_BE_UINT16(ptr + 8);
- int loopEnd = READ_BE_UINT16(ptr + 14);
+ int loopStart = READ_BE_UINT16(ptr + 10) - READ_BE_UINT16(ptr + 8);
+ int loopEnd = READ_BE_UINT16(ptr + 14);
_scumm->_mixer->playRaw(NULL, sound, size, rate,
SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_LOOP, soundID, vol, 0, loopStart, loopEnd);
} else {
@@ -462,7 +462,7 @@ void Sound::playSound(int soundID) {
if (READ_BE_UINT16(ptr + 14) == 0x0880) {
size = READ_BE_UINT16(ptr + 6);
int start = READ_BE_UINT16(ptr + 8);
- start +=10;
+ start += 10;
rate = 11000;
if ((READ_BE_UINT16(ptr + 50) == 0x357c) && (ptr[55] == 6))
@@ -473,9 +473,12 @@ void Sound::playSound(int soundID) {
vol = READ_BE_UINT16(ptr + 58) * 2;
sound = (char *)malloc(size);
- memcpy(sound,ptr + start,size);
+ memcpy(sound, ptr + start, size);
// Experimental sound looping support
+ // FIXME: Fingolfin says: this makes no sense, folks! "start" is used both as a byte offset,
+ // to determine where in the resource the sound data starts, *and* as a loop start offset.
+ // It's extremely unlikely that this is correct.
if (start == 108 || start == 106)
_scumm->_mixer->playRaw(NULL, sound, size, rate,
SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_LOOP, soundID, vol, 0,