Re-land "Support 48kHz in AEC"
Doing something similar for the band 16-24kHz to what is done for the band 8-16kHz. The only difference is that there is no comfort noise added in this band. Could not test how this sounds because there are no aecdumps with 48kHz sample rate as nfar as I know. Tested for 32kHz sample rate and the output is bitexact with how it was before this CL. Original: https://webrtc-codereview.appspot.com/28319004/ Reverted: https://webrtc-codereview.appspot.com/33949004/ BUG=webrtc:3146 R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/41549004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8116 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -50,6 +50,8 @@ class SystemDelayTest : public ::testing::Test {
|
||||
float far_[kSamplesPerChunk];
|
||||
float near_[kSamplesPerChunk];
|
||||
float out_[kSamplesPerChunk];
|
||||
const float* near_ptr_;
|
||||
float* out_ptr_;
|
||||
};
|
||||
|
||||
SystemDelayTest::SystemDelayTest()
|
||||
@ -60,6 +62,8 @@ SystemDelayTest::SystemDelayTest()
|
||||
near_[i] = 514.0;
|
||||
}
|
||||
memset(out_, 0, sizeof(out_));
|
||||
near_ptr_ = near_;
|
||||
out_ptr_ = out_;
|
||||
}
|
||||
|
||||
void SystemDelayTest::SetUp() {
|
||||
@ -103,10 +107,9 @@ void SystemDelayTest::RenderAndCapture(int device_buffer_ms) {
|
||||
EXPECT_EQ(0, WebRtcAec_BufferFarend(handle_, far_, samples_per_frame_));
|
||||
EXPECT_EQ(0,
|
||||
WebRtcAec_Process(handle_,
|
||||
near_,
|
||||
NULL,
|
||||
out_,
|
||||
NULL,
|
||||
&near_ptr_,
|
||||
1,
|
||||
&out_ptr_,
|
||||
samples_per_frame_,
|
||||
device_buffer_ms,
|
||||
0));
|
||||
@ -268,10 +271,9 @@ TEST_F(SystemDelayTest,
|
||||
for (; process_time_ms < kStableConvergenceMs; process_time_ms += 10) {
|
||||
EXPECT_EQ(0,
|
||||
WebRtcAec_Process(handle_,
|
||||
near_,
|
||||
NULL,
|
||||
out_,
|
||||
NULL,
|
||||
&near_ptr_,
|
||||
1,
|
||||
&out_ptr_,
|
||||
samples_per_frame_,
|
||||
kDeviceBufMs,
|
||||
0));
|
||||
@ -322,10 +324,9 @@ TEST_F(SystemDelayTest, CorrectDelayWhenBufferUnderrun) {
|
||||
for (int j = 0; j <= kStableConvergenceMs; j += 10) {
|
||||
EXPECT_EQ(0,
|
||||
WebRtcAec_Process(handle_,
|
||||
near_,
|
||||
NULL,
|
||||
out_,
|
||||
NULL,
|
||||
&near_ptr_,
|
||||
1,
|
||||
&out_ptr_,
|
||||
samples_per_frame_,
|
||||
kDeviceBufMs,
|
||||
0));
|
||||
|
||||
Reference in New Issue
Block a user