Deprecate AudioProcessingBuilder in favor of the BuiltinAudioProcessingBuilder

Update comments and doc mentioning AudioProcessingBuilder accordingly

Bug: webrtc:369904700
Change-Id: If837ddace5fedce94853c80500c6a832de8db9c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367520
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43376}
This commit is contained in:
Danil Chapovalov 2024-11-05 10:48:41 +01:00 committed by WebRTC LUCI CQ
parent 279858e9c8
commit c772fc227b
4 changed files with 10 additions and 10 deletions

View File

@ -86,7 +86,6 @@ class EchoDetector;
// float interfaces use deinterleaved data.
//
// Usage example, omitting error checking:
// rtc::scoped_refptr<AudioProcessing> apm = AudioProcessingBuilder().Create();
//
// AudioProcessing::Config config;
// config.echo_canceller.enabled = true;
@ -102,7 +101,8 @@ class EchoDetector;
//
// config.high_pass_filter.enabled = true;
//
// apm->ApplyConfig(config)
// scoped_refptr<AudioProcessing> apm =
// BuiltinAudioProcessingBuilder(config).Build(CreateEnvironment());
//
// // Start a voice call...
//
@ -780,9 +780,8 @@ class CustomProcessing {
virtual ~CustomProcessing() {}
};
// TODO: bugs.webrtc.org/369904700 - Deprecate and remove in favor of the
// BuiltinAudioProcessingBuilder.
class RTC_EXPORT AudioProcessingBuilder {
// Use BuiltinAudioProcessingBuilder instead, see bugs.webrtc.org/369904700
class RTC_EXPORT [[deprecated]] AudioProcessingBuilder {
public:
AudioProcessingBuilder();
AudioProcessingBuilder(const AudioProcessingBuilder&) = delete;

View File

@ -17,9 +17,9 @@
namespace webrtc {
// Returns an instance of the WebRTC implementation of a residual echo detector.
// It can be provided to the webrtc::AudioProcessingBuilder to obtain the
// It can be provided to the webrtc::BuiltinAudioProcessingBuilder to obtain the
// usual residual echo metrics.
rtc::scoped_refptr<EchoDetector> CreateEchoDetector();
scoped_refptr<EchoDetector> CreateEchoDetector();
} // namespace webrtc

View File

@ -35,7 +35,8 @@ class VoipVolumeControl;
// config.audio_device =
// AudioDeviceModule::Create(AudioDeviceModule::kPlatformDefaultAudio,
// config.task_queue_factory.get());
// config.audio_processing = AudioProcessingBuilder().Create();
// config.audio_processing_builder =
// std::make_unique<BuiltinAudioProcessingBuilder>();
//
// auto voip_engine = CreateVoipEngine(std::move(config));
//

View File

@ -10,8 +10,8 @@ microphone signal. These effects are required for VoIP calling and some
examples include echo cancellation (AEC), noise suppression (NS) and
automatic gain control (AGC).
The API for APM resides in [`/modules/audio_processing/include`][https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/audio_processing/include].
APM is created using the [`AudioProcessingBuilder`][https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/audio_processing/include/audio_processing.h]
The API for APM resides in [`/api/audio/audio_processing.h`][https://webrtc.googlesource.com/src/+/refs/heads/main/api/audio/audio_processing.h].
APM is created using the [`BuiltinAudioProcessingBuilder`][https://webrtc.googlesource.com/src/+/refs/heads/main/api/audio/builtin_audio_processing_builder.h]
builder that allows it to be customized and configured.
Some specific aspects of APM include that: