aboutsummaryrefslogtreecommitdiff
path: root/scumm/sound.cpp
diff options
context:
space:
mode:
authorNicolas Bacca2003-04-05 09:55:12 +0000
committerNicolas Bacca2003-04-05 09:55:12 +0000
commit103937ea63f57f18cea82d426c8a1918d1c352eb (patch)
tree3863532d04acdecab0a63f48336da64ee67db38e /scumm/sound.cpp
parentf8b70406e486a58d32790f3e49048120e7d313a6 (diff)
downloadscummvm-rg350-103937ea63f57f18cea82d426c8a1918d1c352eb.tar.gz
scummvm-rg350-103937ea63f57f18cea82d426c8a1918d1c352eb.tar.bz2
scummvm-rg350-103937ea63f57f18cea82d426c8a1918d1c352eb.zip
Add delay in ms for tremor vorbis implementation and possible autodetection
svn-id: r6911
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r--scumm/sound.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index fa9d7956de..52843c83f6 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -31,11 +31,6 @@
#include "common/config-file.h"
#include "common/util.h"
-#ifdef _WIN32_WCE
-extern void *bsearch(const void *, const void *, size_t,
- size_t, int (*x) (const void *, const void *));
-#endif
-
Sound::Sound(Scumm *parent) {
_scumm = parent;
_nameBundleMusic = NULL;
@@ -1732,9 +1727,16 @@ Sound::VorbisTrackInfo::VorbisTrackInfo(File *file) {
}
}
+#ifdef CHUNKSIZE
+#define VORBIS_TREMOR
+#endif
+
int Sound::VorbisTrackInfo::play(SoundMixer *mixer, int start, int delay) {
- // fixme tremor handles delay differently
- ov_time_seek(&_ov_file, start / 75.0);
+#ifdef VORBIS_TREMOR
+ ov_time_seek(&_ov_file, (int)(start / 75.0) * 1000);
+#else
+ ov_time_seek(&_ov_file, (int)(start / 75.0));
+#endif
return mixer->playVorbis(NULL, &_ov_file,
delay * ov_info(&_ov_file, -1)->rate / 75,
true);