there's no check for apm->ProcessReverseStream(echo_frame); actually,it will return
kBadSampleRateError = -7.
just treat the echo_frame like frame,initialize it and the prog will run happily. the aec module will work.
webrtc::AudioFrame echo_frame = NULL;
if (is_echo_cancel) {
echo_frame = new webrtc::AudioFrame();
echo_frame->numchannels = 1;
echo_frame->sample_ratehz = 16000;
echo_frame->samples_perchannel = frame->sample_ratehz frame_step / 1000.0;
}
there's no check for apm->ProcessReverseStream(echo_frame); actually,it will return kBadSampleRateError = -7. just treat the echo_frame like frame,initialize it and the prog will run happily. the aec module will work. webrtc::AudioFrame echo_frame = NULL; if (is_echo_cancel) { echo_frame = new webrtc::AudioFrame(); echo_frame->numchannels = 1; echo_frame->sample_ratehz = 16000; echo_frame->samples_perchannel = frame->sample_ratehz frame_step / 1000.0; }