From 103937ea63f57f18cea82d426c8a1918d1c352eb Mon Sep 17 00:00:00 2001 From: Nicolas Bacca Date: Sat, 5 Apr 2003 09:55:12 +0000 Subject: Add delay in ms for tremor vorbis implementation and possible autodetection svn-id: r6911 --- scumm/sound.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'scumm') 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); -- cgit v1.2.3