aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/sound.cpp
diff options
context:
space:
mode:
authorNorbert Lange2009-08-08 19:09:30 +0000
committerNorbert Lange2009-08-08 19:09:30 +0000
commit0350a1598deea8d1af252ddd96a490699d10e2e2 (patch)
tree11557d7a87ee5da2ee20e6c13e8be7d2607f393c /engines/scumm/sound.cpp
parentdf06592be1b4c9904acde5a843d3ab3d076c65ac (diff)
parent65a39cc2b0ebb989444330c561743ba0466c1a9c (diff)
downloadscummvm-rg350-0350a1598deea8d1af252ddd96a490699d10e2e2.tar.gz
scummvm-rg350-0350a1598deea8d1af252ddd96a490699d10e2e2.tar.bz2
scummvm-rg350-0350a1598deea8d1af252ddd96a490699d10e2e2.zip
merge with trunk
svn-id: r43134
Diffstat (limited to 'engines/scumm/sound.cpp')
-rw-r--r--engines/scumm/sound.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 2a681ffd62..d1676772a8 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -23,6 +23,9 @@
*
*/
+#include "common/config-manager.h"
+#include "common/timer.h"
+#include "common/util.h"
#include "scumm/actor.h"
#include "scumm/file.h"
@@ -32,10 +35,6 @@
#include "scumm/sound.h"
#include "scumm/util.h"
-#include "common/config-manager.h"
-#include "common/timer.h"
-#include "common/util.h"
-
#include "sound/adpcm.h"
#include "sound/audiocd.h"
#include "sound/flac.h"
@@ -46,8 +45,6 @@
#include "sound/vorbis.h"
#include "sound/wave.h"
-
-
namespace Scumm {
struct MP3OffsetTable { /* Compressed Sound (.SO3) */
@@ -420,17 +417,16 @@ void Sound::playSound(int soundID) {
sound = (char *)malloc(size);
int vol = ptr[24] * 4;
int loopStart = 0, loopEnd = 0;
-#if 0 // Disabling this until after 0.11.0
int loopcount = ptr[27];
if (loopcount > 1) {
// TODO: We can only loop once, or infinitely many times, but
// have no support for a finite number of repetitions.
- // This is
+ // So far, I have seen only 1 and 255 (for infinite repetitions),
+ // so maybe this is not really a problem.
loopStart = READ_BE_UINT16(ptr + 10) - READ_BE_UINT16(ptr + 8);
loopEnd = READ_BE_UINT16(ptr + 14);
flags |= Audio::Mixer::FLAG_LOOP;
}
-#endif
memcpy(sound, ptr + READ_BE_UINT16(ptr + 8), size);
_mixer->playRaw(Audio::Mixer::kSFXSoundType, NULL, sound, size, rate,