summaryrefslogtreecommitdiff
path: root/voice_engine/utility_unittest.cc
diff options
context:
space:
mode:
authorandrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-04-19 00:32:07 +0000
committerandrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-04-19 00:32:07 +0000
commit708ff4d93770d863cdea26fd496ae71414eb8a53 (patch)
treedb558a6a81de3882829fd913b76ab4d71013e682 /voice_engine/utility_unittest.cc
parent74658f6b1fff3e69c2b16b8600d9e2051e505c1c (diff)
downloadwebrtc-708ff4d93770d863cdea26fd496ae71414eb8a53.tar.gz
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/webrtc@5943 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine/utility_unittest.cc')
-rw-r--r--voice_engine/utility_unittest.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/voice_engine/utility_unittest.cc b/voice_engine/utility_unittest.cc
index a5d0bcd8..8f7efa87 100644
--- a/voice_engine/utility_unittest.cc
+++ b/voice_engine/utility_unittest.cc
@@ -39,7 +39,7 @@ class UtilityTest : public ::testing::Test {
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 VerifyFramesAreEqual(const AudioFrame& ref_frame,
}
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) /