r4071 - trunk/bse
- From: stw svn gnome org
- To: svn-commits-list gnome org
- Subject: r4071 - trunk/bse
- Date: Wed, 8 Nov 2006 17:44:32 -0500 (EST)
Author: stw
Date: 2006-11-08 17:44:30 -0500 (Wed, 08 Nov 2006)
New Revision: 4071
Modified:
trunk/bse/ChangeLog
trunk/bse/bseresampler.cc
trunk/bse/bseresampler.hh
trunk/bse/bseresamplerimpl.hh
Log:
Wed Nov 8 23:28:05 2006 Stefan Westerfeld <stefan space twc de>
* bseresampler.[hc]* bseresamplerimpl.hh: Added coefficient set for
linear interpolation. It will probably sound bad, but its useful for
testing.
Modified: trunk/bse/ChangeLog
===================================================================
--- trunk/bse/ChangeLog 2006-11-08 21:23:13 UTC (rev 4070)
+++ trunk/bse/ChangeLog 2006-11-08 22:44:30 UTC (rev 4071)
@@ -1,3 +1,9 @@
+Wed Nov 8 23:28:05 2006 Stefan Westerfeld <stefan space twc de>
+
+ * bseresampler.[hc]* bseresamplerimpl.hh: Added coefficient set for
+ linear interpolation. It will probably sound bad, but its useful for
+ testing.
+
Sun Nov 5 04:23:07 2006 Tim Janik <timj gtk org>
* tests/filtertest.cc (random_filter_tests): extended fixed orders to 32
Modified: trunk/bse/bseresampler.cc
===================================================================
--- trunk/bse/bseresampler.cc 2006-11-08 21:23:13 UTC (rev 4070)
+++ trunk/bse/bseresampler.cc 2006-11-08 22:44:30 UTC (rev 4071)
@@ -264,6 +264,16 @@
-1.841826652067372e-07,
};
+/* linear interpolation coefficients; barely useful for actual audio use,
+ * but useful for testing
+ */
+const double Resampler2::halfband_fir_linear_coeffs[2] = {
+ 0.25,
+ /* here, a 0.5 coefficient will be used */
+ 0.25,
+};
+
+
} // Resampler
} // Bse
Modified: trunk/bse/bseresampler.hh
===================================================================
--- trunk/bse/bseresampler.hh 2006-11-08 21:23:13 UTC (rev 4070)
+++ trunk/bse/bseresampler.hh 2006-11-08 22:44:30 UTC (rev 4071)
@@ -33,6 +33,7 @@
typedef enum /*< skip >*/
{
+ BSE_RESAMPLER2_PREC_LINEAR = 1, /* linear interpolation */
BSE_RESAMPLER2_PREC_48DB = 8,
BSE_RESAMPLER2_PREC_72DB = 12,
BSE_RESAMPLER2_PREC_96DB = 16,
@@ -94,6 +95,7 @@
*/
virtual double delay() const = 0;
protected:
+ static const double halfband_fir_linear_coeffs[2];
static const double halfband_fir_48db_coeffs[16];
static const double halfband_fir_72db_coeffs[24];
static const double halfband_fir_96db_coeffs[32];
Modified: trunk/bse/bseresamplerimpl.hh
===================================================================
--- trunk/bse/bseresamplerimpl.hh 2006-11-08 21:23:13 UTC (rev 4070)
+++ trunk/bse/bseresamplerimpl.hh 2006-11-08 22:44:30 UTC (rev 4071)
@@ -589,6 +589,7 @@
{
switch (precision)
{
+ case BSE_RESAMPLER2_PREC_LINEAR: return create_impl_with_coeffs <Upsampler2<2, USE_SSE> > (halfband_fir_linear_coeffs, 2, 2.0);
case BSE_RESAMPLER2_PREC_48DB: return create_impl_with_coeffs <Upsampler2<16, USE_SSE> > (halfband_fir_48db_coeffs, 16, 2.0);
case BSE_RESAMPLER2_PREC_72DB: return create_impl_with_coeffs <Upsampler2<24, USE_SSE> > (halfband_fir_72db_coeffs, 24, 2.0);
case BSE_RESAMPLER2_PREC_96DB: return create_impl_with_coeffs <Upsampler2<32, USE_SSE> > (halfband_fir_96db_coeffs, 32, 2.0);
@@ -600,6 +601,7 @@
{
switch (precision)
{
+ case BSE_RESAMPLER2_PREC_LINEAR: return create_impl_with_coeffs <Downsampler2<2, USE_SSE> > (halfband_fir_linear_coeffs, 2, 1.0);
case BSE_RESAMPLER2_PREC_48DB: return create_impl_with_coeffs <Downsampler2<16, USE_SSE> > (halfband_fir_48db_coeffs, 16, 1.0);
case BSE_RESAMPLER2_PREC_72DB: return create_impl_with_coeffs <Downsampler2<24, USE_SSE> > (halfband_fir_72db_coeffs, 24, 1.0);
case BSE_RESAMPLER2_PREC_96DB: return create_impl_with_coeffs <Downsampler2<32, USE_SSE> > (halfband_fir_96db_coeffs, 32, 1.0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]