ref: f8f7d9d188749351510b3cae36d9d4a8e0384d87
parent: 219bf830ad01718f43a44a0aa01c8c27620e6a1a
author: Erik de Castro Lopo <[email protected]>
date: Mon Jan 26 18:04:14 EST 2004
Changed allowed SRC ratio range to [1/256, 256]. Fixed src_ratio_test() to pass the new range.
--- a/src/common.h
+++ b/src/common.h
@@ -27,7 +27,7 @@
typedef long int32_t ;
#endif
-#define SRC_MAX_RATIO 12
+#define SRC_MAX_RATIO 256
#define SRC_MIN_RATIO_DIFF (1e-20)
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
@@ -114,6 +114,7 @@
int zoh_set_converter (SRC_PRIVATE *psrc, int src_enum) ;
#endif /* COMMON_H_INCLUDED */
+
/*
** Do not edit or modify anything in this comment block.
** The arch-tag line is a file identity tag for the GNU Arch
--- a/tests/misc_test.c
+++ b/tests/misc_test.c
@@ -80,12 +80,12 @@
} RATIO_TEST ;
static RATIO_TEST ratio_test [] =
-{ { 1.0 / 12.1, 0 },
- { 1.0 / 12.0, 1 },
- { 1.0, 1 },
- { 12.0, 1 },
- { 12.1, 0 },
- { -1.0, 0 }
+{ { 1.0 / 256.1, 0 },
+ { 1.0 / 256.0, 1 },
+ { 1.0, 1 },
+ { 256.0, 1 },
+ { 256.1, 0 },
+ { -1.0, 0 }
} ;
static void
@@ -92,7 +92,7 @@
src_ratio_test (void)
{ int k ;
- puts (" src_ratio_test (SRC ratio must be in range [1/12, 12]):" ) ;
+ puts (" src_ratio_test (SRC ratio must be in range [1/256, 256]):" ) ;
for (k = 0 ; k < ARRAY_LEN (ratio_test) ; k++)