blob: a4ddd49d259e249e33398e5ef673b87dd18279e0 [file] [log] [blame]
solenberg76377c52017-02-21 00:54:31 -08001/*
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 Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MEDIA_ENGINE_APM_HELPERS_H_
12#define MEDIA_ENGINE_APM_HELPERS_H_
solenberg76377c52017-02-21 00:54:31 -080013
Steve Antone78bcb92017-10-31 09:53:08 -070014#include <cstdint>
15
solenberg76377c52017-02-21 00:54:31 -080016namespace webrtc {
17
18class AudioProcessing;
19class AudioDeviceModule;
20
solenberg22818a52017-03-16 01:20:23 -070021enum EcModes {
22 kEcConference, // Conferencing default (aggressive AEC).
23 kEcAecm, // AEC mobile.
24};
25
26struct AgcConfig {
Steve Antone78bcb92017-10-31 09:53:08 -070027 uint16_t targetLeveldBOv;
28 uint16_t digitalCompressionGaindB;
solenberg22818a52017-03-16 01:20:23 -070029 bool limiterEnable;
30};
31
solenberg76377c52017-02-21 00:54:31 -080032namespace apm_helpers {
33
34AgcConfig GetAgcConfig(AudioProcessing* apm);
35void SetAgcConfig(AudioProcessing* apm,
36 const AgcConfig& config);
37void SetAgcStatus(AudioProcessing* apm,
38 AudioDeviceModule* adm,
solenberg22818a52017-03-16 01:20:23 -070039 bool enable);
solenberg76377c52017-02-21 00:54:31 -080040void SetEcStatus(AudioProcessing* apm,
41 bool enable,
42 EcModes mode);
43void SetEcMetricsStatus(AudioProcessing* apm, bool enable);
44void SetAecmMode(AudioProcessing* apm, bool enable_cng);
45void SetNsStatus(AudioProcessing* apm, bool enable);
46void SetTypingDetectionStatus(AudioProcessing* apm, bool enable);
47
48} // namespace apm_helpers
49} // namespace webrtc
50
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020051#endif // MEDIA_ENGINE_APM_HELPERS_H_