Gustaf Ullberg | c453c16 | 2018-02-16 12:09:55 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 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 | #include "api/audio/echo_canceller3_factory.h" |
| 11 | |
Gustaf Ullberg | 0efa941 | 2018-02-27 13:58:45 +0100 | [diff] [blame] | 12 | #include <memory> |
| 13 | |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 14 | #include "absl/memory/memory.h" |
Gustaf Ullberg | 0efa941 | 2018-02-27 13:58:45 +0100 | [diff] [blame] | 15 | #include "modules/audio_processing/aec3/echo_canceller3.h" |
Gustaf Ullberg | 0efa941 | 2018-02-27 13:58:45 +0100 | [diff] [blame] | 16 | |
| 17 | namespace webrtc { |
| 18 | |
| 19 | EchoCanceller3Factory::EchoCanceller3Factory() {} |
| 20 | |
| 21 | EchoCanceller3Factory::EchoCanceller3Factory(const EchoCanceller3Config& config) |
| 22 | : config_(config) {} |
| 23 | |
| 24 | std::unique_ptr<EchoControl> EchoCanceller3Factory::Create(int sample_rate_hz) { |
Per Åhgren | ce202a0 | 2019-09-02 17:01:19 +0200 | [diff] [blame^] | 25 | return absl::make_unique<EchoCanceller3>(config_, sample_rate_hz, |
| 26 | /*num_render_channels=*/1, |
| 27 | /*num_capture_channels=*/1); |
Gustaf Ullberg | 0efa941 | 2018-02-27 13:58:45 +0100 | [diff] [blame] | 28 | } |
Per Åhgren | ce202a0 | 2019-09-02 17:01:19 +0200 | [diff] [blame^] | 29 | |
Gustaf Ullberg | 0efa941 | 2018-02-27 13:58:45 +0100 | [diff] [blame] | 30 | } // namespace webrtc |