Update Webrtc to new AudioProcessing API.

webrtc::PostProcessor changed to webrtc::CustomProcessor and one APM
factory method has been deprecated.

The APM API changed in this cl: https://webrtc-review.googlesource.com/c/src/+/29201

TBR=henrik.lundin@webrtc.org, sakal@webrtc.org

Bug: webrtc:8665
Change-Id: I76dfc7831575d4dfce7e60cbe22007bd2a50e946
Reviewed-on: https://webrtc-review.googlesource.com/34381
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21451}
This commit is contained in:
Alex Loiko
2017-12-27 09:36:31 +01:00
committed by Commit Bot
parent 144d05570a
commit 97cb448d25
2 changed files with 4 additions and 3 deletions

View File

@ -22,10 +22,11 @@ static jlong JNI_DefaultAudioProcessingFactory_CreateAudioProcessing(
JNIEnv*,
const JavaParamRef<jclass>&,
jlong native_post_processor) {
std::unique_ptr<PostProcessing> post_processor(
reinterpret_cast<PostProcessing*>(native_post_processor));
std::unique_ptr<CustomProcessing> post_processor(
reinterpret_cast<CustomProcessing*>(native_post_processor));
rtc::scoped_refptr<AudioProcessing> audio_processing =
AudioProcessing::Create(webrtc::Config(), std::move(post_processor),
nullptr /* render_pre_processing */,
nullptr /* echo_control_factory */,
nullptr /* beamformer */);
return jlongFromPointer(audio_processing.release());

View File

@ -70,7 +70,7 @@ std::unique_ptr<AudioProcessing> CreateAPM(const uint8_t** data,
config.Set<Intelligibility>(new Intelligibility(*ie));
std::unique_ptr<AudioProcessing> apm(AudioProcessing::Create(
config, nullptr, std::move(echo_control_factory), nullptr));
config, nullptr, nullptr, std::move(echo_control_factory), nullptr));
webrtc::AudioProcessing::Config apm_config;
apm_config.residual_echo_detector.enabled = *red;