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
This commit is contained in:
Torbjörn Andersson 2005-08-26 12:50:54 +00:00
parent d8a96c3032
commit 2174c6f49c

View File

@ -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