[Scummvm-cvs-logs] CVS: scummvm/sound voc.cpp,NONE,1.1 fmopl.cpp,1.14,1.15 mixer.cpp,1.124,1.125 module.mk,1.10,1.11 voc.h,1.3,1.4
Max Horn
fingolfin at users.sourceforge.net
Wed Sep 10 05:23:00 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common file.cpp,1.43,1.44 savefile.cpp,1.1,1.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/midi adlib.cpp,1.47,1.48 alsa.cpp,1.12,1.13 morphos.cpp,1.7,1.8 quicktime.cpp,1.7,1.8 seq.cpp,1.8,1.9 windows.cpp,1.11,1.12 ypa1.cpp,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv13139
Modified Files:
fmopl.cpp mixer.cpp module.mk voc.h
Added Files:
voc.cpp
Log Message:
moved declaration of error/warning/debug from engine.h to util.h; added voc.cpp
--- NEW FILE: voc.cpp ---
/* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: /cvsroot/scummvm/scummvm/sound/voc.cpp,v 1.1 2003/09/10 12:19:57 fingolfin Exp $
*
*/
#include "stdafx.h"
#include "common/util.h"
#include "sound/voc.h"
int getSampleRateFromVOCRate(int vocSR) {
if (vocSR == 0xa5 || vocSR == 0xa6) {
return 11025;
} else if (vocSR == 0xd2 || vocSR == 0xd3) {
return 22050;
} else {
int sr = 1000000L / (256L - vocSR);
warning("inexact sample rate used: %i (0x%x)", sr, vocSR);
return sr;
}
}
Index: fmopl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/fmopl.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- fmopl.cpp 11 Jul 2003 07:13:54 -0000 1.14
+++ fmopl.cpp 10 Sep 2003 12:19:57 -0000 1.15
@@ -32,7 +32,7 @@
#include "fmopl.h"
-#include "common/engine.h" // for warning/error/debug
+#include "common/util.h"
#ifndef PI
#define PI 3.14159265358979323846
Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- mixer.cpp 6 Sep 2003 10:47:29 -0000 1.124
+++ mixer.cpp 10 Sep 2003 12:19:57 -0000 1.125
@@ -21,7 +21,6 @@
*/
#include "stdafx.h"
-#include "common/engine.h" // for warning/error/debug
#include "common/file.h"
#include "common/util.h"
Index: module.mk
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/module.mk,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- module.mk 28 Jul 2003 20:42:54 -0000 1.10
+++ module.mk 10 Sep 2003 12:19:57 -0000 1.11
@@ -8,8 +8,9 @@
sound/midiparser_xmidi.o \
sound/mixer.o \
sound/mpu401.o \
- sound/rate.o
-# sound/resample.o
+ sound/rate.o \
+# sound/resample.o \
+ sound/voc.o
# Include common rules
include common.rules
Index: voc.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/voc.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- voc.h 9 Sep 2003 12:36:41 -0000 1.3
+++ voc.h 10 Sep 2003 12:19:57 -0000 1.4
@@ -48,17 +48,10 @@
#pragma END_PACK_STRUCTS
#endif
-
-static inline int getSampleRateFromVOCRate(int vocSR) {
- if (vocSR == 0xa5 || vocSR == 0xa6) {
- return 11025;
- } else if (vocSR == 0xd2 || vocSR == 0xd3) {
- return 22050;
- } else {
- int sr = 1000000L / (256L - vocSR);
- warning("inexact sample rate used: %i (0x%x)", sr, vocSR);
- return sr;
- }
-}
+/**
+ * Take a sample rate parameter as it occurs in a VOC sound header, and
+ * return the corresponding sample frequency.
+ */
+extern int getSampleRateFromVOCRate(int vocSR);
#endif
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common file.cpp,1.43,1.44 savefile.cpp,1.1,1.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/midi adlib.cpp,1.47,1.48 alsa.cpp,1.12,1.13 morphos.cpp,1.7,1.8 quicktime.cpp,1.7,1.8 seq.cpp,1.8,1.9 windows.cpp,1.11,1.12 ypa1.cpp,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list