blob: f6dd8cbd78ab916f527ed16fcc68578c5c113be9 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
bjornv@webrtc.org0c6f9312012-01-30 09:39:08 +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
bjornv@webrtc.org0c6f9312012-01-30 09:39:08 +000011#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
12#define WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
pbos@webrtc.org7fad4b82013-05-28 08:11:59 +000014#include "webrtc/modules/audio_processing/include/audio_processing.h"
15#include "webrtc/modules/audio_processing/processing_component.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000016
17namespace webrtc {
18class AudioProcessingImpl;
19class AudioBuffer;
20
21class NoiseSuppressionImpl : public NoiseSuppression,
22 public ProcessingComponent {
23 public:
24 explicit NoiseSuppressionImpl(const AudioProcessingImpl* apm);
25 virtual ~NoiseSuppressionImpl();
26
27 int ProcessCaptureAudio(AudioBuffer* audio);
28
29 // NoiseSuppression implementation.
pbos@webrtc.org91620802013-08-02 11:44:11 +000030 virtual bool is_enabled() const OVERRIDE;
31 virtual float speech_probability() const OVERRIDE;
niklase@google.com470e71d2011-07-07 08:21:25 +000032
niklase@google.com470e71d2011-07-07 08:21:25 +000033 private:
34 // NoiseSuppression implementation.
pbos@webrtc.org91620802013-08-02 11:44:11 +000035 virtual int Enable(bool enable) OVERRIDE;
36 virtual int set_level(Level level) OVERRIDE;
37 virtual Level level() const OVERRIDE;
niklase@google.com470e71d2011-07-07 08:21:25 +000038
39 // ProcessingComponent implementation.
pbos@webrtc.org91620802013-08-02 11:44:11 +000040 virtual void* CreateHandle() const OVERRIDE;
41 virtual int InitializeHandle(void* handle) const OVERRIDE;
42 virtual int ConfigureHandle(void* handle) const OVERRIDE;
43 virtual int DestroyHandle(void* handle) const OVERRIDE;
44 virtual int num_handles_required() const OVERRIDE;
45 virtual int GetHandleError(void* handle) const OVERRIDE;
niklase@google.com470e71d2011-07-07 08:21:25 +000046
47 const AudioProcessingImpl* apm_;
48 Level level_;
49};
50} // namespace webrtc
51
bjornv@webrtc.org0c6f9312012-01-30 09:39:08 +000052#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_