Audacity  2.2.2
Noise.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  Noise.h
6 
7  Dominic Mazzoni
8 
9  An effect to add white noise.
10 
11 **********************************************************************/
12 
13 #ifndef __AUDACITY_EFFECT_NOISE__
14 #define __AUDACITY_EFFECT_NOISE__
15 
16 #include <wx/string.h>
17 
18 #include "../widgets/NumericTextCtrl.h"
19 
20 #include "Effect.h"
21 
22 class ShuttleGui;
23 
24 #define NOISE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Noise") }
25 
26 class EffectNoise final : public Effect
27 {
28 public:
29  EffectNoise();
30  virtual ~EffectNoise();
31 
32  // IdentInterface implementation
33 
35  wxString GetDescription() override;
36  wxString ManualPage() override;
37 
38  // EffectDefinitionInterface implementation
39 
40  EffectType GetType() override;
41 
42  // EffectClientInterface implementation
43 
44  unsigned GetAudioOutCount() override;
45  size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override;
46  bool DefineParams( ShuttleParams & S ) override;
47  bool GetAutomationParameters(CommandParameters & parms) override;
48  bool SetAutomationParameters(CommandParameters & parms) override;
49 
50  // Effect implementation
51 
52  bool Startup() override;
53  void PopulateOrExchange(ShuttleGui & S) override;
54  bool TransferDataToWindow() override;
55  bool TransferDataFromWindow() override;
56 
57 private:
58  // EffectNoise implementation
59 
60 private:
61  int mType;
62  double mAmp;
63 
64  float y, z, buf0, buf1, buf2, buf3, buf4, buf5, buf6;
65 
67 };
68 
69 #endif
NumericTextCtrl * mNoiseDurationT
Definition: Noise.h:66
bool Startup() override
Definition: Noise.cpp:192
float buf1
Definition: Noise.h:64
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
bool DefineParams(ShuttleParams &S) override
Definition: Noise.cpp:165
EffectNoise()
Definition: Noise.cpp:56
float y
Definition: Noise.h:64
bool TransferDataToWindow() override
Definition: Noise.cpp:248
Base class for many of the effects in Audacity.
Definition: Effect.h:62
float buf3
Definition: Noise.h:64
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:60
int mType
Definition: Noise.h:61
bool GetAutomationParameters(CommandParameters &parms) override
Definition: Noise.cpp:171
float buf2
Definition: Noise.h:64
double mAmp
Definition: Noise.h:62
size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override
Definition: Noise.cpp:101
EffectType GetType() override
Definition: Noise.cpp:89
IdentInterfaceSymbol GetSymbol() override
Definition: Noise.cpp:72
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the Shuttle cla...
unsigned GetAudioOutCount() override
Definition: Noise.cpp:96
wxString ManualPage() override
Definition: Noise.cpp:82
float buf5
Definition: Noise.h:64
IdentInterfaceSymbol pairs a persistent string identifier used internally with an optional...
void PopulateOrExchange(ShuttleGui &S) override
Definition: Noise.cpp:220
bool TransferDataFromWindow() override
Definition: Noise.cpp:260
EffectType
float z
Definition: Noise.h:64
float buf4
Definition: Noise.h:64
virtual ~EffectNoise()
Definition: Noise.cpp:66
wxString GetDescription() override
Definition: Noise.cpp:77
float buf6
Definition: Noise.h:64
An effect to add white noise.
Definition: Noise.h:26
float buf0
Definition: Noise.h:64
bool SetAutomationParameters(CommandParameters &parms) override
Definition: Noise.cpp:179