blob: 9ffc4d12f7e8db7b6370420cc76e377ae898879a [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
andrew@webrtc.org6f9f8172012-03-06 19:03:39 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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 WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_IMPL_H
12#define WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_IMPL_H
13
pbos@webrtc.org956aa7e2013-05-21 13:52:32 +000014#include "webrtc/voice_engine/include/voe_audio_processing.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000015
pbos@webrtc.org956aa7e2013-05-21 13:52:32 +000016#include "webrtc/voice_engine/shared_data.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000017
niklase@google.com470e71d2011-07-07 08:21:25 +000018namespace webrtc {
19
tommi@webrtc.orga990e122012-04-26 15:28:22 +000020class VoEAudioProcessingImpl : public VoEAudioProcessing {
andrew@webrtc.org8b111eb2012-03-06 19:50:12 +000021 public:
Jelena Marusic0d266052015-05-04 14:15:32 +020022 int SetNsStatus(bool enable, NsModes mode = kNsUnchanged) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000023
Jelena Marusic0d266052015-05-04 14:15:32 +020024 int GetNsStatus(bool& enabled, NsModes& mode) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000025
Jelena Marusic0d266052015-05-04 14:15:32 +020026 int SetAgcStatus(bool enable, AgcModes mode = kAgcUnchanged) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000027
Jelena Marusic0d266052015-05-04 14:15:32 +020028 int GetAgcStatus(bool& enabled, AgcModes& mode) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000029
Jelena Marusic0d266052015-05-04 14:15:32 +020030 int SetAgcConfig(AgcConfig config) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000031
Jelena Marusic0d266052015-05-04 14:15:32 +020032 int GetAgcConfig(AgcConfig& config) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000033
Jelena Marusic0d266052015-05-04 14:15:32 +020034 int SetEcStatus(bool enable, EcModes mode = kEcUnchanged) override;
35 int GetEcStatus(bool& enabled, EcModes& mode) override;
36 int EnableDriftCompensation(bool enable) override;
37 bool DriftCompensationEnabled() override;
niklase@google.com470e71d2011-07-07 08:21:25 +000038
Jelena Marusic0d266052015-05-04 14:15:32 +020039 void SetDelayOffsetMs(int offset) override;
40 int DelayOffsetMs() override;
andrew@webrtc.org6f9f8172012-03-06 19:03:39 +000041
Jelena Marusic0d266052015-05-04 14:15:32 +020042 int SetAecmMode(AecmModes mode = kAecmSpeakerphone,
43 bool enableCNG = true) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000044
Jelena Marusic0d266052015-05-04 14:15:32 +020045 int GetAecmMode(AecmModes& mode, bool& enabledCNG) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000046
Jelena Marusic0d266052015-05-04 14:15:32 +020047 int EnableHighPassFilter(bool enable) override;
48 bool IsHighPassFilterEnabled() override;
andrew@webrtc.org369166a2012-04-24 18:38:03 +000049
Jelena Marusic0d266052015-05-04 14:15:32 +020050 int VoiceActivityIndicator(int channel) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000051
Jelena Marusic0d266052015-05-04 14:15:32 +020052 int SetEcMetricsStatus(bool enable) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000053
Jelena Marusic0d266052015-05-04 14:15:32 +020054 int GetEcMetricsStatus(bool& enabled) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000055
Jelena Marusic0d266052015-05-04 14:15:32 +020056 int GetEchoMetrics(int& ERL, int& ERLE, int& RERL, int& A_NLP) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000057
Jelena Marusic0d266052015-05-04 14:15:32 +020058 int GetEcDelayMetrics(int& delay_median,
59 int& delay_std,
60 float& fraction_poor_delays) override;
bjornv@webrtc.org3765bd22011-10-17 08:49:23 +000061
Jelena Marusic0d266052015-05-04 14:15:32 +020062 int StartDebugRecording(const char* fileNameUTF8) override;
63 int StartDebugRecording(FILE* file_handle) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000064
Jelena Marusic0d266052015-05-04 14:15:32 +020065 int StopDebugRecording() override;
niklase@google.com470e71d2011-07-07 08:21:25 +000066
Jelena Marusic0d266052015-05-04 14:15:32 +020067 int SetTypingDetectionStatus(bool enable) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000068
Jelena Marusic0d266052015-05-04 14:15:32 +020069 int GetTypingDetectionStatus(bool& enabled) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000070
Jelena Marusic0d266052015-05-04 14:15:32 +020071 int TimeSinceLastTyping(int& seconds) override;
niklas.enbom@webrtc.org3dc88652012-03-30 09:53:54 +000072
niklas.enbom@webrtc.orgee646c32012-05-24 11:41:02 +000073 // TODO(niklase) Remove default argument as soon as libJingle is updated!
Jelena Marusic0d266052015-05-04 14:15:32 +020074 int SetTypingDetectionParameters(int timeWindow,
75 int costPerTyping,
76 int reportingThreshold,
77 int penaltyDecay,
78 int typeEventDelay = 0) override;
niklas.enbom@webrtc.org06e722a2012-04-04 07:44:27 +000079
Jelena Marusic0d266052015-05-04 14:15:32 +020080 void EnableStereoChannelSwapping(bool enable) override;
81 bool IsStereoChannelSwappingEnabled() override;
andrew@webrtc.org02d71742012-04-24 19:47:00 +000082
andrew@webrtc.org8b111eb2012-03-06 19:50:12 +000083 protected:
tommi@webrtc.org851becd2012-04-04 14:57:19 +000084 VoEAudioProcessingImpl(voe::SharedData* shared);
Jelena Marusic0d266052015-05-04 14:15:32 +020085 ~VoEAudioProcessingImpl() override;
niklase@google.com470e71d2011-07-07 08:21:25 +000086
andrew@webrtc.org8b111eb2012-03-06 19:50:12 +000087 private:
88 bool _isAecMode;
tommi@webrtc.org851becd2012-04-04 14:57:19 +000089 voe::SharedData* _shared;
niklase@google.com470e71d2011-07-07 08:21:25 +000090};
91
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +000092} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000093
andrew@webrtc.org8b111eb2012-03-06 19:50:12 +000094#endif // WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_IMPL_H