Audacity 3.2.0
FindClippingBase.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 FindClippingBase.h
6
7 Dominic Mazzoni
8 Vaughan Johnson (dialog)
9
10**********************************************************************/
11#pragma once
12
13class LabelTrack;
14class WaveChannel;
15
16#include "ShuttleAutomation.h"
17#include "StatefulEffect.h"
18
19class BUILTIN_EFFECTS_API FindClippingBase : public StatefulEffect
20{
21public:
22 static inline FindClippingBase*
24 {
25 return &e;
26 }
28
30 virtual ~FindClippingBase();
31
32 // ComponentInterface implementation
33
34 ComponentInterfaceSymbol GetSymbol() const override;
35 TranslatableString GetDescription() const override;
36 ManualPageID ManualPage() const override;
37
38 // EffectDefinitionInterface implementation
39
40 EffectType GetType() const override;
41
42 // Effect implementation
43
44 bool Process(EffectInstance& instance, EffectSettings& settings) override;
45
46private:
47 // EffectFindCliping implementation
48
49 bool ProcessOne(
50 LabelTrack& lt, int count, const WaveChannel& wt, sampleCount start,
51 sampleCount len);
52
53protected:
54 int mStart;
56 int mStop;
58 // To do: eliminate this
59
60 const EffectParameterMethods& Parameters() const override;
61
62 static constexpr EffectParameter Start {
63 &FindClippingBase::mStart, L"Duty Cycle Start", 3, 1, INT_MAX, 1
64 };
65 static constexpr EffectParameter Stop {
66 &FindClippingBase::mStop, L"Duty Cycle End", 3, 1, INT_MAX, 1
67 };
68};
EffectType
static Settings & settings()
Definition: TrackInfo.cpp:51
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
virtual EffectType GetType() const =0
Type determines how it behaves.
virtual ManualPageID ManualPage() const
Name of a page in the Audacity alpha manual, default is empty.
virtual const EffectParameterMethods & Parameters() const
Definition: Effect.cpp:96
TranslatableString GetDescription() const override
Definition: Effect.cpp:64
ComponentInterfaceSymbol GetSymbol() const override
Definition: Effect.cpp:49
Performs effect computation.
Interface for manipulations of an Effect's settings.
Locates clipping and inserts labels when found.
static const ComponentInterfaceSymbol Symbol
static FindClippingBase * FetchParameters(FindClippingBase &e, EffectSettings &)
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:98
virtual bool Process(EffectInstance &instance, EffectSettings &settings)=0
Holds a msgid for the translation catalog; may also bind format arguments.
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19
Externalized state of a plug-in.