[Scummvm-cvs-logs] SF.net SVN: scummvm: [27991] scummvm/branches/gsoc2007-mixer/sound
dogmatixman at users.sourceforge.net
dogmatixman at users.sourceforge.net
Mon Jul 9 19:05:44 CEST 2007
Revision: 27991
http://scummvm.svn.sourceforge.net/scummvm/?rev=27991&view=rev
Author: dogmatixman
Date: 2007-07-09 10:05:44 -0700 (Mon, 09 Jul 2007)
Log Message:
-----------
Bugfix for even length filters, and added a destructor.
Modified Paths:
--------------
scummvm/branches/gsoc2007-mixer/sound/filter.cpp
scummvm/branches/gsoc2007-mixer/sound/filter.h
Modified: scummvm/branches/gsoc2007-mixer/sound/filter.cpp
===================================================================
--- scummvm/branches/gsoc2007-mixer/sound/filter.cpp 2007-07-09 12:17:15 UTC (rev 27990)
+++ scummvm/branches/gsoc2007-mixer/sound/filter.cpp 2007-07-09 17:05:44 UTC (rev 27991)
@@ -110,7 +110,7 @@
}
for (i = 0; i <= (length - 1) / 2; i++) {
- int16 n = i - (length - 1) / 2;
+ double n = i - (length - 1) / 2 - ((length % 2) ? 0 : 0.5);
/*
* Both this window and the later filter are even symmetric, so we
@@ -144,7 +144,7 @@
uint16 i;
for (i = 0; i <= (length - 1) / 2; i++) {
- int16 n = i - (length - 1) / 2;
+ double n = i - (length - 1) / 2 - ((length % 2) ? 0 : 0.5);
/*
* Use an ideal transition halfway between the passband and stopband
Modified: scummvm/branches/gsoc2007-mixer/sound/filter.h
===================================================================
--- scummvm/branches/gsoc2007-mixer/sound/filter.h 2007-07-09 12:17:15 UTC (rev 27990)
+++ scummvm/branches/gsoc2007-mixer/sound/filter.h 2007-07-09 17:05:44 UTC (rev 27991)
@@ -52,6 +52,8 @@
double dBStopbandAtten,
uint16 samplingFreq);
+ ~FIRFilter() { free(_coeffs); }
+
uint16 getLength() { return _length; }
double *getCoeffs() { return _coeffs; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list