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:
bjornv@webrtc.org 2014-09-15 13:23:07 +00:00
parent 76ba7caae8
commit 7bb2586c55

View File

@ -1411,14 +1411,17 @@ int WebRtcAec_InitAec(AecCore* aec, int sampFreq) {
if (WebRtc_InitBuffer(aec->far_time_buf) == -1) {
return -1;
}
{
int process_rate = sampFreq > 16000 ? 16000 : sampFreq;
ReopenWav(&aec->farFile, "aec_far",
aec->instance_index, aec->debug_dump_count, sampFreq);
aec->instance_index, aec->debug_dump_count, process_rate);
ReopenWav(&aec->nearFile, "aec_near",
aec->instance_index, aec->debug_dump_count, sampFreq);
aec->instance_index, aec->debug_dump_count, process_rate);
ReopenWav(&aec->outFile, "aec_out",
aec->instance_index, aec->debug_dump_count, sampFreq);
aec->instance_index, aec->debug_dump_count, process_rate);
ReopenWav(&aec->outLinearFile, "aec_out_linear",
aec->instance_index, aec->debug_dump_count, sampFreq);
aec->instance_index, aec->debug_dump_count, process_rate);
}
++aec->debug_dump_count;
#endif
aec->system_delay = 0;