From 2174c6f49c042a2dc33c015089444651ec843ef0 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Fri, 26 Aug 2005 12:50:54 +0000 Subject: 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 --- sword1/sound.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sword1') 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 -- cgit v1.2.3