audio_processing: Correct sample rate in aec_debug_dump
When writing to wav files in the low level flag aec_debug_dump incorrect sample rates were used for recordings using rates from 32 kHz and above. This since internally inside the AEC we process the data using 16 kHz. Any upper band is processed and combined later on. This CL adds the correct sample rate to the recording. BUG=3359 TESTED=locally on 44.1 kHz recordings on Linux R=aluebs@webrtc.org Review URL: https://webrtc-codereview.appspot.com/23649004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7182 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
76ba7caae8
commit
7bb2586c55
@ -1411,14 +1411,17 @@ int WebRtcAec_InitAec(AecCore* aec, int sampFreq) {
|
||||
if (WebRtc_InitBuffer(aec->far_time_buf) == -1) {
|
||||
return -1;
|
||||
}
|
||||
ReopenWav(&aec->farFile, "aec_far",
|
||||
aec->instance_index, aec->debug_dump_count, sampFreq);
|
||||
ReopenWav(&aec->nearFile, "aec_near",
|
||||
aec->instance_index, aec->debug_dump_count, sampFreq);
|
||||
ReopenWav(&aec->outFile, "aec_out",
|
||||
aec->instance_index, aec->debug_dump_count, sampFreq);
|
||||
ReopenWav(&aec->outLinearFile, "aec_out_linear",
|
||||
aec->instance_index, aec->debug_dump_count, sampFreq);
|
||||
{
|
||||
int process_rate = sampFreq > 16000 ? 16000 : sampFreq;
|
||||
ReopenWav(&aec->farFile, "aec_far",
|
||||
aec->instance_index, aec->debug_dump_count, process_rate);
|
||||
ReopenWav(&aec->nearFile, "aec_near",
|
||||
aec->instance_index, aec->debug_dump_count, process_rate);
|
||||
ReopenWav(&aec->outFile, "aec_out",
|
||||
aec->instance_index, aec->debug_dump_count, process_rate);
|
||||
ReopenWav(&aec->outLinearFile, "aec_out_linear",
|
||||
aec->instance_index, aec->debug_dump_count, process_rate);
|
||||
}
|
||||
++aec->debug_dump_count;
|
||||
#endif
|
||||
aec->system_delay = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user