Use AudioProcessingBuilder everywhere AudioProcessing is created.
The AudioProcessingBuilder was recently introduced in https://webrtc-review.googlesource.com/c/src/+/34651 to make it easier to create APM instances. This CL replaces all calls to the old Create methods with the new AudioProcessingBuilder. Bug: webrtc:8668 Change-Id: Ibb5f0fc0dbcc85fcf3355b01bec916f20fe0eb67 Reviewed-on: https://webrtc-review.googlesource.com/36082 Commit-Queue: Ivo Creusen <ivoc@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21534}
This commit is contained in:
@ -26,7 +26,7 @@ rtc::scoped_refptr<AudioEncoderFactory> CreateAudioEncoderFactory() {
|
||||
}
|
||||
|
||||
rtc::scoped_refptr<AudioProcessing> CreateAudioProcessing() {
|
||||
return AudioProcessing::Create();
|
||||
return AudioProcessingBuilder().Create();
|
||||
}
|
||||
|
||||
} // namespace jni
|
||||
|
||||
@ -25,10 +25,9 @@ static jlong JNI_DefaultAudioProcessingFactory_CreateAudioProcessing(
|
||||
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 */);
|
||||
AudioProcessingBuilder()
|
||||
.SetCapturePostProcessing(std::move(post_processor))
|
||||
.Create();
|
||||
return jlongFromPointer(audio_processing.release());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user