lifeiteng / codingmath

Tech
MIT License
81 stars 44 forks source link

echo_frame should be initialized as frame #2

Open matlab2000 opened 6 years ago

matlab2000 commented 6 years ago

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; }