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

Travis Howell kirben at users.sourceforge.net
Sat Jul 5 23:48:23 CEST 2003


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

Modified Files:
	sound.cpp 
Log Message:

zak256 sound updates from Hibernatus


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- sound.cpp	6 Jul 2003 06:19:52 -0000	1.156
+++ sound.cpp	6 Jul 2003 06:47:26 -0000	1.157
@@ -1,1851 +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
[...3677 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