[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.157,1.158

Travis Howell kirben at users.sourceforge.net
Sun Jul 6 00:00:33 CEST 2003


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

Modified Files:
	sound.cpp 
Log Message:




Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- sound.cpp	6 Jul 2003 06:47:26 -0000	1.157
+++ sound.cpp	6 Jul 2003 06:57:41 -0000	1.158
@@ -1,1857 +1,1857 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001  Ludvig Strigeus
- * Copyright (C) 2001-2003 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
[...3683 lines suppressed...]
+
+int VorbisTrackInfo::play(SoundMixer *mixer, int startFrame, int endFrame) {
+#ifdef VORBIS_TREMOR
+	ov_time_seek(&_ov_file, (ogg_int64_t)(startFrame / 75.0 * 1000));
+#else
+	ov_time_seek(&_ov_file, startFrame / 75.0);
+#endif
+	return mixer->playVorbis(NULL, &_ov_file,
+				 endFrame * ov_info(&_ov_file, -1)->rate / 75,
+				 true);
+}
+
+VorbisTrackInfo::~VorbisTrackInfo() {
+	if (! _error_flag) {
+		ov_clear(&_ov_file);
+		delete _file;
+	}
+}
+
+#endif





More information about the Scummvm-git-logs mailing list