blob: a246448c267dca9f4b9601bf7455a82cd3901e9b [file] [log] [blame]
Per Åhgrencc73ed32020-04-26 21:56:171/*
2 * Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Per Åhgrencc73ed32020-04-26 21:56:1711#include <memory>
12
Niels Möller105711e2022-06-14 13:48:2613#include "api/make_ref_counted.h"
Per Åhgrencc73ed32020-04-26 21:56:1714#include "modules/audio_processing/audio_processing_impl.h"
Niels Möller105711e2022-06-14 13:48:2615#include "modules/audio_processing/include/audio_processing.h"
Per Åhgrencc73ed32020-04-26 21:56:1716
17namespace webrtc {
18
19AudioProcessingBuilder::AudioProcessingBuilder() = default;
20AudioProcessingBuilder::~AudioProcessingBuilder() = default;
21
Niels Möller4f776ac2021-07-02 09:30:5422rtc::scoped_refptr<AudioProcessing> AudioProcessingBuilder::Create() {
Per Åhgrencc73ed32020-04-26 21:56:1723#ifdef WEBRTC_EXCLUDE_AUDIO_PROCESSING_MODULE
Alessio Bazzicabe1b8982021-09-17 06:26:1024 // Return a null pointer when the APM is excluded from the build.
Per Åhgrencc73ed32020-04-26 21:56:1725 return nullptr;
Alessio Bazzicabe1b8982021-09-17 06:26:1026#else // WEBRTC_EXCLUDE_AUDIO_PROCESSING_MODULE
Niels Möller4f776ac2021-07-02 09:30:5427 return rtc::make_ref_counted<AudioProcessingImpl>(
Alessio Bazzica20a9ac62021-10-14 08:55:0828 config_, std::move(capture_post_processing_),
29 std::move(render_pre_processing_), std::move(echo_control_factory_),
30 std::move(echo_detector_), std::move(capture_analyzer_));
Per Åhgrencc73ed32020-04-26 21:56:1731#endif
32}
33
34} // namespace webrtc