Audacity  2.2.0
Leveller.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  Leveller.h
6 
7  Lynn Allan
8 
9 **********************************************************************/
10 
11 #ifndef __AUDACITY_EFFECT_LEVELER__
12 #define __AUDACITY_EFFECT_LEVELER__
13 
14 #include <wx/arrstr.h>
15 #include <wx/string.h>
16 
17 #include "Effect.h"
18 
19 class ShuttleGui;
20 
21 #define LEVELLER_PLUGIN_SYMBOL XO("Leveller")
22 
23 class EffectLeveller final : public Effect
24 {
25 public:
27  virtual ~EffectLeveller();
28 
29  // IdentInterface implementation
30 
31  wxString GetSymbol() override;
32  wxString GetDescription() override;
33 
34  // EffectIdentInterface implementation
35 
36  EffectType GetType() override;
37 
38  // EffectClientInterface implementation
39 
40  unsigned GetAudioInCount() override;
41  unsigned GetAudioOutCount() override;
42  size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override;
43  bool GetAutomationParameters(EffectAutomationParameters & parms) override;
44  bool SetAutomationParameters(EffectAutomationParameters & parms) override;
45 
46  // Effect implementation
47 
48  bool Startup() override;
49  void PopulateOrExchange(ShuttleGui & S) override;
50  bool TransferDataToWindow() override;
51  bool TransferDataFromWindow() override;
52 
53 private:
54  // EffectLeveller implementation
55 
56  void CalcLevellerFactors();
57  float LevelOneFrame(float frame);
58 
59 private:
62 
63  int mDbIndex;
65 };
66 
67 #endif
68 
wxString GetSymbol() override
Definition: Leveller.cpp:76
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:369
EffectLeveller()
Definition: Leveller.cpp:59
wxString GetDescription() override
Definition: Leveller.cpp:81
Base class for many of the effects in Audacity.
Definition: Effect.h:62
unsigned GetAudioInCount() override
Definition: Leveller.cpp:95
int mDbIndex
Definition: Leveller.h:63
int mPassIndex
Definition: Leveller.h:64
virtual ~EffectLeveller()
Definition: Leveller.cpp:70
An Effect that aims to selectively make softer sounds louder.
Definition: Leveller.h:23
EffectType GetType() override
Definition: Leveller.cpp:88
void CalcLevellerFactors()
Definition: Leveller.cpp:266
size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override
Definition: Leveller.cpp:105
void PopulateOrExchange(ShuttleGui &S) override
Definition: Leveller.cpp:199
bool GetAutomationParameters(EffectAutomationParameters &parms) override
Definition: Leveller.cpp:123
bool SetAutomationParameters(EffectAutomationParameters &parms) override
Definition: Leveller.cpp:131
double mDbSilenceThreshold
Definition: Leveller.h:61
unsigned GetAudioOutCount() override
Definition: Leveller.cpp:100
bool TransferDataFromWindow() override
Definition: Leveller.cpp:242
int mNumPasses
Definition: Leveller.h:60
float LevelOneFrame(float frame)
Definition: Leveller.cpp:292
bool TransferDataToWindow() override
Definition: Leveller.cpp:232
bool Startup() override
Definition: Leveller.cpp:163