[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.100,1.101

Nicolas Bacca arisme at users.sourceforge.net
Sat Apr 5 01:56:02 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv4480

Modified Files:
	sound.cpp 
Log Message:
Add delay in ms for tremor vorbis implementation and possible autodetection

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- sound.cpp	25 Mar 2003 15:55:27 -0000	1.100
+++ sound.cpp	5 Apr 2003 09:55:12 -0000	1.101
@@ -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 @@
 	}
 }
 
+#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);





More information about the Scummvm-git-logs mailing list