diff --git a/src/conversions/sample_rate.rs b/src/conversions/sample_rate.rs index caa5efb..21b39b0 100644 --- a/src/conversions/sample_rate.rs +++ b/src/conversions/sample_rate.rs @@ -285,10 +285,10 @@ mod test { assert_eq!(input, output); } - fn half_sample_rate(to: u32, input: Vec) -> () { + fn half_sample_rate(to: u32, input: Vec, n: u16) -> () { let to = if to == 0 { return; } else { SampleRate(to) }; let from = multiply_rate(to, 2); - let n = 2u16; + if n == 0 { return; } // Truncate the input, so it contains an integer number of frames. let input = { @@ -306,10 +306,10 @@ mod test { output) } - fn double_sample_rate(from: u32, input: Vec) -> () { + fn double_sample_rate(from: u32, input: Vec, n: u16) -> () { let from = if from == 0 { return; } else { SampleRate(from) }; let to = multiply_rate(from, 2); - let n = 2u16; + if n == 0 { return; } // Truncate the input, so it contains an integer number of frames. let input = {