Resampler modifications in preparation for arbitrary audioproc rates.
- Templatize PushResampler to support int16 and float.
- Add a helper method to PushSincResampler to compute the algorithmic
delay.
This is a prerequisite of:
http://review.webrtc.org/9919004/
BUG=2894
R=turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/12169004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5943 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/voice_engine/utility_unittest.cc b/webrtc/voice_engine/utility_unittest.cc
index a5d0bcd..8f7efa8 100644
--- a/webrtc/voice_engine/utility_unittest.cc
+++ b/webrtc/voice_engine/utility_unittest.cc
@@ -39,7 +39,7 @@
int dst_channels, int dst_sample_rate_hz,
FunctionToTest function);
- PushResampler resampler_;
+ PushResampler<int16_t> resampler_;
AudioFrame src_frame_;
AudioFrame dst_frame_;
AudioFrame golden_frame_;
@@ -127,11 +127,11 @@
}
void UtilityTest::RunResampleTest(int src_channels,
- int src_sample_rate_hz,
- int dst_channels,
- int dst_sample_rate_hz,
- FunctionToTest function) {
- PushResampler resampler; // Create a new one with every test.
+ int src_sample_rate_hz,
+ int dst_channels,
+ int dst_sample_rate_hz,
+ FunctionToTest function) {
+ PushResampler<int16_t> resampler; // Create a new one with every test.
const int16_t kSrcLeft = 30; // Shouldn't overflow for any used sample rate.
const int16_t kSrcRight = 15;
const float resampling_factor = (1.0 * src_sample_rate_hz) /