[Scummvm-cvs-logs] CVS: scummvm/sound resample.cpp,1.11,1.12 resample.h,1.4,1.5
Max Horn
fingolfin at users.sourceforge.net
Fri Oct 3 03:31:04 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/dists/msvc6 bs2.dsp,NONE,1.1 queen.dsp,NONE,1.1 scumm.dsp,NONE,1.1 scummvm.dsp,NONE,1.1 scummvm.dsw,NONE,1.1 simon.dsp,NONE,1.1 sky.dsp,NONE,1.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen logic.cpp,1.13,1.14 logic.h,1.6,1.7 cutaway.cpp,1.4,1.5 cutaway.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv10487
Modified Files:
resample.cpp resample.h
Log Message:
undo aquadran's recent changes here. If this doesn't compile on MSVC7, fine, simply remove it from your project file - it's not supposed to be compiled ATM
Index: resample.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/resample.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- resample.cpp 3 Oct 2003 07:45:41 -0000 1.11
+++ resample.cpp 3 Oct 2003 10:30:33 -0000 1.12
@@ -59,10 +59,10 @@
static int makeFilter(HWORD Imp[], HWORD ImpD[], UHWORD *LpScl, UHWORD Nwing,
double Froll, double Beta);
-static int32 FilterUp(HWORD Imp[], HWORD ImpD[], UHWORD Nwing, bool Interp,
+static WORD FilterUp(HWORD Imp[], HWORD ImpD[], UHWORD Nwing, bool Interp,
HWORD *Xp, HWORD Inc, HWORD Ph);
-static int32 FilterUD(HWORD Imp[], HWORD ImpD[], UHWORD Nwing, bool Interp,
+static WORD FilterUD(HWORD Imp[], HWORD ImpD[], UHWORD Nwing, bool Interp,
HWORD *Xp, HWORD Ph, HWORD Inc, UHWORD dhb);
@@ -144,7 +144,7 @@
#define IBUFFSIZE 4096 /* Input buffer size */
-static inline HWORD WordToHword(int32 v, int scl)
+static inline HWORD WordToHword(WORD v, int scl)
{
HWORD out;
@@ -167,7 +167,7 @@
HWORD Imp[], HWORD ImpD[], bool Interp)
{
HWORD *Xp, *Ystart;
- int32 v;
+ WORD v;
double dt; /* Step through input signal */
UWORD dtb; /* Fixed-point version of Dt */
@@ -203,7 +203,7 @@
HWORD Imp[], HWORD ImpD[], bool Interp)
{
HWORD *Xp, *Ystart;
- int32 v;
+ WORD v;
double dh; /* Step through filter impulse response */
double dt; /* Step through input signal */
@@ -267,7 +267,7 @@
/* Calculate ideal lowpass filter impulse response coefficients: */
c[0] = 2.0*frq;
for (i=1; i<N; i++) {
- temp = PI*(double)i/(double)Num;
+ temp = M_PI*(double)i/(double)Num;
c[i] = sin(2.0*temp*frq)/temp; /* Analog sinc function, cutoff = frq */
}
@@ -346,13 +346,13 @@
#pragma mark -
-int32 FilterUp(HWORD Imp[], HWORD ImpD[],
+WORD FilterUp(HWORD Imp[], HWORD ImpD[],
UHWORD Nwing, bool Interp,
HWORD *Xp, HWORD Ph, HWORD Inc)
{
HWORD *Hp, *Hdp = NULL, *End;
HWORD a = 0;
- int32 v, t;
+ WORD v, t;
v=0;
Hp = &Imp[Ph>>Na];
@@ -397,7 +397,7 @@
return(v);
}
-int32 FilterUD( HWORD Imp[], HWORD ImpD[],
+WORD FilterUD( HWORD Imp[], HWORD ImpD[],
UHWORD Nwing, bool Interp,
HWORD *Xp, HWORD Ph, HWORD Inc, UHWORD dhb)
{
@@ -492,7 +492,7 @@
for (i=0; i<Xoff; X1[i++]=0); /* Need Xoff zeros at begining of sample */
for (i=0; i<Xoff; X2[i++]=0); /* Need Xoff zeros at begining of sample */
-
+
do {
if (!last) /* If haven't read last sample yet */
{
@@ -932,8 +932,8 @@
Xread = Xoff; /* Position in input array to read into */
Time = (Xoff<<Np); /* Current-time pointer for converter */
- Nout = SrcUp(X1, Y1, factor, &Time, Nx, Nwing, LpScl, Imp, ImpD, quadr != 0);
- Nout = SrcUD(X1, Y1, factor, &Time, Nx, Nwing, LpScl, Imp, ImpD, quadr != 0);
+ Nout = SrcUp(X1, Y1, factor, &Time, Nx, Nwing, LpScl, Imp, ImpD, quadr);
+ Nout = SrcUD(X1, Y1, factor, &Time, Nx, Nwing, LpScl, Imp, ImpD, quadr);
// st_resample_start(&rstuff, inrate, outrate);
}
Index: resample.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/resample.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- resample.h 3 Oct 2003 07:45:41 -0000 1.4
+++ resample.h 3 Oct 2003 10:30:33 -0000 1.5
@@ -31,6 +31,7 @@
// From resample's stddef.h
typedef int16 HWORD;
typedef uint16 UHWORD;
+typedef int32 WORD;
typedef uint32 UWORD;
#define MAX_HWORD (32767)
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/dists/msvc6 bs2.dsp,NONE,1.1 queen.dsp,NONE,1.1 scumm.dsp,NONE,1.1 scummvm.dsp,NONE,1.1 scummvm.dsw,NONE,1.1 simon.dsp,NONE,1.1 sky.dsp,NONE,1.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen logic.cpp,1.13,1.14 logic.h,1.6,1.7 cutaway.cpp,1.4,1.5 cutaway.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list