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
This commit is contained in:
@ -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) /
|
||||
|
||||
Reference in New Issue
Block a user