solenberg | 76377c5 | 2017-02-21 00:54:31 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef MEDIA_ENGINE_APM_HELPERS_H_ |
| 12 | #define MEDIA_ENGINE_APM_HELPERS_H_ |
solenberg | 76377c5 | 2017-02-21 00:54:31 -0800 | [diff] [blame] | 13 | |
Steve Anton | e78bcb9 | 2017-10-31 09:53:08 -0700 | [diff] [blame] | 14 | #include <cstdint> |
| 15 | |
solenberg | 76377c5 | 2017-02-21 00:54:31 -0800 | [diff] [blame] | 16 | namespace webrtc { |
| 17 | |
| 18 | class AudioProcessing; |
| 19 | class AudioDeviceModule; |
| 20 | |
solenberg | 22818a5 | 2017-03-16 01:20:23 -0700 | [diff] [blame] | 21 | enum EcModes { |
| 22 | kEcConference, // Conferencing default (aggressive AEC). |
| 23 | kEcAecm, // AEC mobile. |
| 24 | }; |
| 25 | |
| 26 | struct AgcConfig { |
Steve Anton | e78bcb9 | 2017-10-31 09:53:08 -0700 | [diff] [blame] | 27 | uint16_t targetLeveldBOv; |
| 28 | uint16_t digitalCompressionGaindB; |
solenberg | 22818a5 | 2017-03-16 01:20:23 -0700 | [diff] [blame] | 29 | bool limiterEnable; |
| 30 | }; |
| 31 | |
solenberg | 76377c5 | 2017-02-21 00:54:31 -0800 | [diff] [blame] | 32 | namespace apm_helpers { |
| 33 | |
| 34 | AgcConfig GetAgcConfig(AudioProcessing* apm); |
| 35 | void SetAgcConfig(AudioProcessing* apm, |
| 36 | const AgcConfig& config); |
| 37 | void SetAgcStatus(AudioProcessing* apm, |
| 38 | AudioDeviceModule* adm, |
solenberg | 22818a5 | 2017-03-16 01:20:23 -0700 | [diff] [blame] | 39 | bool enable); |
solenberg | 76377c5 | 2017-02-21 00:54:31 -0800 | [diff] [blame] | 40 | void SetEcStatus(AudioProcessing* apm, |
| 41 | bool enable, |
| 42 | EcModes mode); |
| 43 | void SetEcMetricsStatus(AudioProcessing* apm, bool enable); |
| 44 | void SetAecmMode(AudioProcessing* apm, bool enable_cng); |
| 45 | void SetNsStatus(AudioProcessing* apm, bool enable); |
| 46 | void SetTypingDetectionStatus(AudioProcessing* apm, bool enable); |
| 47 | |
| 48 | } // namespace apm_helpers |
| 49 | } // namespace webrtc |
| 50 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 51 | #endif // MEDIA_ENGINE_APM_HELPERS_H_ |