shithub: libsamplerate

Download patch

ref: 3770b8ea5dc7f0e90d50181bdbb5f41dfdd87565
parent: b9e50b5422bd185e9cba9bb11dede954a80d87ad
author: Erik de Castro Lopo <erikd@miles>
date: Sun Jul 4 06:38:15 EDT 2004

Improve octave scripts used for calculating filers.

--- a/make_src_filter.m
+++ b/make_src_filter.m
@@ -22,12 +22,12 @@
 fudge_factor1 = 1.0 ;
 f1 = generate_filter (cycles, fudge_factor1, increment, atten) ;
 [stop_atten stop_band_start1 minus_3db] = measure_filter (f1, atten) ;
-printf ("    fudge_factor : %10.8f   stop_band_start : %10.8f   1\n", fudge_factor1, stop_band_start1) ;
+printf ("    fudge_factor : %15.13f   stop_band_start : %15.13f   1\n", fudge_factor1, stop_band_start1) ;
 
 fudge_factor2 = 1.25 ;
 f2 = generate_filter (cycles, fudge_factor2, increment, atten) ;
 [stop_atten stop_band_start2 minus_3db] = measure_filter (f2, atten) ;
-printf ("    fudge_factor : %10.8f   stop_band_start : %10.8f   2\n", fudge_factor2, stop_band_start2) ;
+printf ("    fudge_factor : %15.13f   stop_band_start : %15.13f   2\n", fudge_factor2, stop_band_start2) ;
 
 f = f1 ;
 fudge_factor = fudge_factor1 ;
@@ -35,7 +35,7 @@
 
 while ((stop_band_start1 - stop_band_start2) > 0.00000001)
 	if (stop_band_start1 < stop_band_start2)
-		printf ("stop_band_start1 < stop_band_start2") ;
+		printf ("stop_band_start1 < stop_band_start2\n") ;
 		break ;
 		endif
 
@@ -44,7 +44,7 @@
 	[stop_atten stop_band_start minus_3db] = measure_filter (f, atten) ;
 	
 	if (stop_band_start > 1.0)
-		printf ("%10.8f   %10.8f   %10.8f\n", fudge_factor1, fudge_factor, fudge_factor2) ;
+		printf ("A %10.8f   %10.8f   %10.8f\n", fudge_factor1, fudge_factor, fudge_factor2) ;
 		continue ;
 		endif
 
@@ -60,7 +60,7 @@
 		choice = 1 ;
 		endif
 
-	printf ("    fudge_factor : %10.8f   stop_band_start : %10.8f   %d\n", fudge_factor, stop_band_start, choice) ;
+	printf ("    fudge_factor : %15.13f   stop_band_start : %15.13f   %d\n", fudge_factor, stop_band_start, choice) ;
 	endwhile
 
 printf ("\n") ;
--- a/measure_filter.m
+++ b/measure_filter.m
@@ -1,7 +1,7 @@
 function [stop_atten stop_band_start minus_3db] = measure_filter (f, atten)
 
 
-spec_len = 200000 ;
+spec_len = 400000 ;
 
 # Calculate the spectrum.