aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-08-26 12:50:54 +0000
committerTorbjörn Andersson2005-08-26 12:50:54 +0000
commit2174c6f49c042a2dc33c015089444651ec843ef0 (patch)
tree49244f3c6987796a9bdf371c5012aaede7c39757 /sword1
parentd8a96c30321c6a615689ed5137b3a26161e2d154 (diff)
downloadscummvm-rg350-2174c6f49c042a2dc33c015089444651ec843ef0.tar.gz
scummvm-rg350-2174c6f49c042a2dc33c015089444651ec843ef0.tar.bz2
scummvm-rg350-2174c6f49c042a2dc33c015089444651ec843ef0.zip
Implement looping sounds. This should fix bug #1273741, hopefully without
causing any problems. (I assume either the game scripts or the engine will make sure that looped sounds are stopped.) svn-id: r18713
Diffstat (limited to 'sword1')
-rw-r--r--sword1/sound.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sword1/sound.cpp b/sword1/sound.cpp
index ee6aca37b2..fdcde884f8 100644
--- a/sword1/sound.cpp
+++ b/sword1/sound.cpp
@@ -166,6 +166,8 @@ void Sound::playSample(QueueElement *elem) {
flags = Audio::Mixer::FLAG_UNSIGNED;
if (READ_LE_UINT16(sampleData + 0x16) == 2)
flags |= Audio::Mixer::FLAG_STEREO;
+ if (_fxList[elem->id].type == FX_LOOP)
+ flags |= Audio::Mixer::FLAG_LOOP;
_mixer->playRaw(&elem->handle, sampleData + 0x2C, size, 11025, flags, elem->id, volume, pan);
}
} else