r4048 - in trunk: . tests tests/audio



Author: stw
Date: 2006-10-31 08:56:08 -0500 (Tue, 31 Oct 2006)
New Revision: 4048

Modified:
   trunk/ChangeLog
   trunk/tests/audio/organsong.bse
   trunk/tests/testresampler.cc
Log:
Tue Oct 31 14:23:33 2006  Stefan Westerfeld  <stefan space twc de>

	* tests/audio/organsong.bse: Updated copyright/comment: melody is
	based on music composed by J.S.Bach.

	* tests/testresampler.cc: Use delay compensation API where
	appropriate, instead of using the filter order to compute the
	resampler delay.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-10-31 13:54:59 UTC (rev 4047)
+++ trunk/ChangeLog	2006-10-31 13:56:08 UTC (rev 4048)
@@ -1,3 +1,12 @@
+Tue Oct 31 14:23:33 2006  Stefan Westerfeld  <stefan space twc de>
+
+	* tests/audio/organsong.bse: Updated copyright/comment: melody is
+	based on music composed by J.S.Bach.
+
+	* tests/testresampler.cc: Use delay compensation API where
+	appropriate, instead of using the filter order to compute the
+	resampler delay.
+
 Mon Oct 30 23:57:03 2006  Tim Janik  <timj gtk org>
 
 	* r+d-files/bse-ellf.c: changed code generation to generate tables,

Modified: trunk/tests/audio/organsong.bse
===================================================================
--- trunk/tests/audio/organsong.bse	2006-10-31 13:54:59 UTC (rev 4047)
+++ trunk/tests/audio/organsong.bse	2006-10-31 13:56:08 UTC (rev 4048)
@@ -15,7 +15,8 @@
   (modification-time "2006-10-21 19:32:55")
   (creation-time "2006-10-21 19:13:49")
   (license "Creative Commons Attribution 2.5 (http://creativecommons.org/licenses/by/2.5/)")
-  (author "Stefan Westerfeld")
+  (blurb "Melody based on BWV 147 Herz und Mund und Tat und Leben / Jesus bleibet meine Freude")
+  (author "Johann-Sebastian Bach, Stefan Westerfeld")
   (container-child "BsePart::Part-1"
     (n-channels 1)
     (insert-notes 0

Modified: trunk/tests/testresampler.cc
===================================================================
--- trunk/tests/testresampler.cc	2006-10-31 13:54:59 UTC (rev 4047)
+++ trunk/tests/testresampler.cc	2006-10-31 13:56:08 UTC (rev 4048)
@@ -452,30 +452,29 @@
 
 	      if (RESAMPLE == RES_UPSAMPLE)
 		{
-		  sin_shift = ups->order() + 2;		// 16 bits: 34
+		  sin_shift = ups->delay();
 		  freq_factor = 0.5;
 		  out_bs = bs * 2;
 		  correct_volume = 1;
 		}
 	      else if (RESAMPLE == RES_DOWNSAMPLE)
 		{
-		  sin_shift = (downs->order() + 1) * 0.5;	// 16 bits: 16.5
+		  sin_shift = downs->delay();
 		  freq_factor = 2;
 		  out_bs = bs / 2;
 		  correct_volume = (test_frequency < (44100/4)) ? 1 : 0;
 		}
 	      else if (RESAMPLE == RES_OVERSAMPLE)
 		{
-		  sin_shift = ups->order() + 1.5;		// 16 bits: 33.5
+		  sin_shift = ups->delay() * 0.5 + downs->delay();
 		  freq_factor = 1;
 		  check = output2;
 		  out_bs = bs;
 		  correct_volume = 1;
 		}
-	      else if (RESAMPLE == RES_SUBSAMPLE)		// 16 bits: 67
+	      else if (RESAMPLE == RES_SUBSAMPLE)
 		{
-		  sin_shift = ups->order() * 2 + 3;
-		  //printf ("Isshift = %f\n", sin_shift);
+		  sin_shift = downs->delay() * 2 + ups->delay();
 		  freq_factor = 1;
 		  check = output2;
 		  out_bs = bs;




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]