Audacity  2.2.2
FindClipping.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  FindClipping.h
6 
7  Dominic Mazzoni
8  Vaughan Johnson (dialog)
9 
10 **********************************************************************/
11 
12 #ifndef __AUDACITY_EFFECT_FINDCLIPPING__
13 #define __AUDACITY_EFFECT_FINDCLIPPING__
14 
15 class wxString;
16 
17 class LabelTrack;
18 
19 #include <wx/string.h>
20 
21 #include "Effect.h"
22 
23 #define FINDCLIPPING_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Find Clipping") }
24 
25 class EffectFindClipping final : public Effect
26 {
27 public:
29  virtual ~EffectFindClipping();
30 
31  // IdentInterface implementation
32 
34  wxString GetDescription() override;
35  wxString ManualPage() override;
36 
37  // EffectDefinitionInterface implementation
38 
39  EffectType GetType() override;
40 
41  // EffectClientInterface implementation
42 
43  bool DefineParams( ShuttleParams & S ) override;
44  bool GetAutomationParameters(CommandParameters & parms) override;
45  bool SetAutomationParameters(CommandParameters & parms) override;
46 
47  // Effect implementation
48 
49  bool Process() override;
50  void PopulateOrExchange(ShuttleGui & S) override;
51  bool TransferDataToWindow() override;
52  bool TransferDataFromWindow() override;
53 
54 private:
55  // EffectFindCliping implementation
56 
57  bool ProcessOne(LabelTrack *lt, int count, const WaveTrack * wt,
58  sampleCount start, sampleCount len);
59 
60 private:
61  int mStart;
62  int mStop;
63 };
64 
65 #endif // __AUDACITY_EFFECT_FINDCLIPPING__
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
int mStart
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:61
EffectType GetType() override
int mStop
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:62
void PopulateOrExchange(ShuttleGui &S) override
IdentInterfaceSymbol GetSymbol() override
Base class for many of the effects in Audacity.
Definition: Effect.h:62
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:60
bool DefineParams(ShuttleParams &S) override
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:113
virtual ~EffectFindClipping()
bool SetAutomationParameters(CommandParameters &parms) override
bool TransferDataToWindow() override
wxString GetDescription() override
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the Shuttle cla...
A Track that contains audio waveform data.
Definition: WaveTrack.h:60
IdentInterfaceSymbol pairs a persistent string identifier used internally with an optional...
bool TransferDataFromWindow() override
bool Process() override
bool ProcessOne(LabelTrack *lt, int count, const WaveTrack *wt, sampleCount start, sampleCount len)
bool GetAutomationParameters(CommandParameters &parms) override
EffectType
wxString ManualPage() override
Locates clipping and inserts labels when found.
Definition: FindClipping.h:25