blob: 13be65988dda3b1d768e4961be45e2ef3b6015f4 [file] [log] [blame]
Sam Zackrisson74ed7342018-08-16 10:54:07 +02001/*
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
11#ifndef MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_PROXY_H_
12#define MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_PROXY_H_
13
Sam Zackrisson2fbb83b2018-09-28 12:40:47 +020014#include "modules/audio_processing/echo_control_mobile_impl.h"
Sam Zackrisson74ed7342018-08-16 10:54:07 +020015#include "modules/audio_processing/include/audio_processing.h"
16#include "rtc_base/constructormagic.h"
17#include "rtc_base/scoped_ref_ptr.h"
18
19namespace webrtc {
20
21// Class for temporarily redirecting AECM configuration to a new API.
22class EchoControlMobileProxy : public EchoControlMobile {
23 public:
24 EchoControlMobileProxy(AudioProcessing* audio_processing,
Sam Zackrisson2fbb83b2018-09-28 12:40:47 +020025 EchoControlMobileImpl* echo_control_mobile);
Sam Zackrisson74ed7342018-08-16 10:54:07 +020026 ~EchoControlMobileProxy() override;
27
28 bool is_enabled() const override;
29 RoutingMode routing_mode() const override;
30 bool is_comfort_noise_enabled() const override;
31 int Enable(bool enable) override;
32 int set_routing_mode(RoutingMode mode) override;
33 int enable_comfort_noise(bool enable) override;
34 int SetEchoPath(const void* echo_path, size_t size_bytes) override;
35 int GetEchoPath(void* echo_path, size_t size_bytes) const override;
36
37 private:
38 AudioProcessing* audio_processing_;
Sam Zackrisson2fbb83b2018-09-28 12:40:47 +020039 EchoControlMobileImpl* echo_control_mobile_;
Sam Zackrisson74ed7342018-08-16 10:54:07 +020040
41 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoControlMobileProxy);
42};
43} // namespace webrtc
44
45#endif // MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_PROXY_H_