Overte C++ Documentation
AudioGate.h
1 //
2 // AudioGate.h
3 // libraries/audio/src
4 //
5 // Created by Ken Cooke on 5/5/17.
6 // Copyright 2016 High Fidelity, Inc.
7 //
8 
9 #ifndef hifi_AudioGate_h
10 #define hifi_AudioGate_h
11 
12 #include <stdint.h>
13 
14 class GateImpl;
15 
16 class AudioGate {
17 public:
18  AudioGate(int sampleRate, int numChannels);
19  ~AudioGate();
20 
21  //
22  // Process interleaved int16_t input/output (in-place is allowed).
23  // Returns true when output is non-zero.
24  //
25  bool render(int16_t* input, int16_t* output, int numFrames);
26  bool removeDC(int16_t* input, int16_t* output, int numFrames);
27 
28  void setThreshold(float threshold);
29  void setRelease(float release);
30 
31 private:
32  GateImpl* _impl;
33 };
34 
35 #endif // hifi_AudioGate_h