blob: 63a60dcb46e519534e58acff41c17fcd92cbec8c [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 SetRxNsStatus(int channel,
35 bool enable,
36 NsModes mode = kNsUnchanged) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000037
Jelena Marusic0d266052015-05-04 14:15:32 +020038 int GetRxNsStatus(int channel, bool& enabled, NsModes& mode) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000039
Jelena Marusic0d266052015-05-04 14:15:32 +020040 int SetRxAgcStatus(int channel,
41 bool enable,
42 AgcModes mode = kAgcUnchanged) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000043
Jelena Marusic0d266052015-05-04 14:15:32 +020044 int GetRxAgcStatus(int channel, bool& enabled, AgcModes& mode) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000045
Jelena Marusic0d266052015-05-04 14:15:32 +020046 int SetRxAgcConfig(int channel, AgcConfig config) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000047
Jelena Marusic0d266052015-05-04 14:15:32 +020048 int GetRxAgcConfig(int channel, AgcConfig& config) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000049
Jelena Marusic0d266052015-05-04 14:15:32 +020050 int SetEcStatus(bool enable, EcModes mode = kEcUnchanged) override;
51 int GetEcStatus(bool& enabled, EcModes& mode) override;
52 int EnableDriftCompensation(bool enable) override;
53 bool DriftCompensationEnabled() override;
niklase@google.com470e71d2011-07-07 08:21:25 +000054
Jelena Marusic0d266052015-05-04 14:15:32 +020055 void SetDelayOffsetMs(int offset) override;
56 int DelayOffsetMs() override;
andrew@webrtc.org6f9f8172012-03-06 19:03:39 +000057
Jelena Marusic0d266052015-05-04 14:15:32 +020058 int SetAecmMode(AecmModes mode = kAecmSpeakerphone,
59 bool enableCNG = true) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000060
Jelena Marusic0d266052015-05-04 14:15:32 +020061 int GetAecmMode(AecmModes& mode, bool& enabledCNG) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000062
Jelena Marusic0d266052015-05-04 14:15:32 +020063 int EnableHighPassFilter(bool enable) override;
64 bool IsHighPassFilterEnabled() override;
andrew@webrtc.org369166a2012-04-24 18:38:03 +000065
Jelena Marusic0d266052015-05-04 14:15:32 +020066 int RegisterRxVadObserver(int channel, VoERxVadCallback& observer) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000067
Jelena Marusic0d266052015-05-04 14:15:32 +020068 int DeRegisterRxVadObserver(int channel) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000069
Jelena Marusic0d266052015-05-04 14:15:32 +020070 int VoiceActivityIndicator(int channel) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000071
Jelena Marusic0d266052015-05-04 14:15:32 +020072 int SetEcMetricsStatus(bool enable) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000073
Jelena Marusic0d266052015-05-04 14:15:32 +020074 int GetEcMetricsStatus(bool& enabled) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000075
Jelena Marusic0d266052015-05-04 14:15:32 +020076 int GetEchoMetrics(int& ERL, int& ERLE, int& RERL, int& A_NLP) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000077
Jelena Marusic0d266052015-05-04 14:15:32 +020078 int GetEcDelayMetrics(int& delay_median,
79 int& delay_std,
80 float& fraction_poor_delays) override;
bjornv@webrtc.org3765bd22011-10-17 08:49:23 +000081
Jelena Marusic0d266052015-05-04 14:15:32 +020082 int StartDebugRecording(const char* fileNameUTF8) override;
83 int StartDebugRecording(FILE* file_handle) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000084
Jelena Marusic0d266052015-05-04 14:15:32 +020085 int StopDebugRecording() override;
niklase@google.com470e71d2011-07-07 08:21:25 +000086
Jelena Marusic0d266052015-05-04 14:15:32 +020087 int SetTypingDetectionStatus(bool enable) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000088
Jelena Marusic0d266052015-05-04 14:15:32 +020089 int GetTypingDetectionStatus(bool& enabled) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000090
Jelena Marusic0d266052015-05-04 14:15:32 +020091 int TimeSinceLastTyping(int& seconds) override;
niklas.enbom@webrtc.org3dc88652012-03-30 09:53:54 +000092
niklas.enbom@webrtc.orgee646c32012-05-24 11:41:02 +000093 // TODO(niklase) Remove default argument as soon as libJingle is updated!
Jelena Marusic0d266052015-05-04 14:15:32 +020094 int SetTypingDetectionParameters(int timeWindow,
95 int costPerTyping,
96 int reportingThreshold,
97 int penaltyDecay,
98 int typeEventDelay = 0) override;
niklas.enbom@webrtc.org06e722a2012-04-04 07:44:27 +000099
Jelena Marusic0d266052015-05-04 14:15:32 +0200100 void EnableStereoChannelSwapping(bool enable) override;
101 bool IsStereoChannelSwappingEnabled() override;
andrew@webrtc.org02d71742012-04-24 19:47:00 +0000102
andrew@webrtc.org8b111eb2012-03-06 19:50:12 +0000103 protected:
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000104 VoEAudioProcessingImpl(voe::SharedData* shared);
Jelena Marusic0d266052015-05-04 14:15:32 +0200105 ~VoEAudioProcessingImpl() override;
niklase@google.com470e71d2011-07-07 08:21:25 +0000106
andrew@webrtc.org8b111eb2012-03-06 19:50:12 +0000107 private:
108 bool _isAecMode;
tommi@webrtc.org851becd2012-04-04 14:57:19 +0000109 voe::SharedData* _shared;
niklase@google.com470e71d2011-07-07 08:21:25 +0000110};
111
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +0000112} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +0000113
andrew@webrtc.org8b111eb2012-03-06 19:50:12 +0000114#endif // WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_IMPL_H