diff libaf/af.h @ 24888:b2402b4f0afa

libaf: change filter input/output ratio calculations Change the audio filters to use a double instead of rationals for the ratio of output to input size. The rationals could overflow when calculating the overall ratio of a filter chain and gave no real advantage compared to doubles.
author uau
date Thu, 01 Nov 2007 06:52:01 +0000
parents 484b8eaaf28f
children 4055d43fc406
line wrap: on
line diff
--- a/libaf/af.h	Thu Nov 01 06:51:57 2007 +0000
+++ b/libaf/af.h	Thu Nov 01 06:52:01 2007 +0000
@@ -65,7 +65,7 @@
   struct af_instance_s* next;
   struct af_instance_s* prev;  
   double delay; // Delay caused by the filter [ms]
-  frac_t mul; /* length multiplier: how much does this instance change
+  double mul; /* length multiplier: how much does this instance change
 		 the length of the buffer. */
 }af_instance_t;
 
@@ -238,7 +238,7 @@
 /* Helper function used to calculate the exact buffer length needed
    when buffers are resized. The returned length is >= than what is
    needed */
-int af_lencalc(frac_t mul, af_data_t* data);
+int af_lencalc(double mul, af_data_t* data);
 
 /**
  * \brief convert dB to gain value