Audacity 3.2.0
Amplify.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 Amplify.h
6
7 Dominic Mazzoni
8
9 This rewritten class supports a smart Amplify effect - it calculates
10 the maximum amount of gain that can be applied to all tracks without
11 causing clipping and selects this as the default parameter.
12
13**********************************************************************/
14
15#ifndef __AUDACITY_EFFECT_AMPLIFY__
16#define __AUDACITY_EFFECT_AMPLIFY__
17
18#include "AmplifyBase.h"
20#include <wx/weakref.h>
21
22class wxSlider;
23class wxCheckBox;
24class wxTextCtrl;
25class ShuttleGui;
26
28{
29public:
30 std::shared_ptr<EffectInstance> MakeInstance() const override;
31
32 // ComponentInterface implementation
33
34 ComponentInterfaceSymbol GetSymbol() const override;
35 TranslatableString GetDescription() const override;
36 ManualPageID ManualPage() const override;
37
38 std::unique_ptr<EffectEditor> PopulateOrExchange(
40 const EffectOutputs* pOutputs) override;
41 bool TransferDataToWindow(const EffectSettings& settings) override;
43
44DECLARE_EVENT_TABLE()
45
46 void OnAmpText(wxCommandEvent& evt);
47 void OnPeakText(wxCommandEvent & evt);
48 void OnAmpSlider(wxCommandEvent & evt);
49 void OnClipCheckBox(wxCommandEvent & evt);
50
51 void CheckClip();
52
53private:
54 wxWeakRef<wxWindow> mUIParent {};
55
56 wxSlider *mAmpS;
57 wxTextCtrl *mAmpT;
58 wxTextCtrl *mNewPeakT;
59 wxCheckBox *mClip;
60};
61
62#endif // __AUDACITY_EFFECT_AMPLIFY__
#define S(N)
Definition: ToChars.cpp:64
static Settings & settings()
Definition: TrackInfo.cpp:51
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
An Effect that makes a sound louder or softer.
Definition: Amplify.h:28
wxWeakRef< wxWindow > mUIParent
Definition: Amplify.h:54
wxTextCtrl * mNewPeakT
Definition: Amplify.h:58
std::shared_ptr< EffectInstance > MakeInstance() const override
Make an object maintaining short-term state of an Effect.
Definition: Amplify.cpp:201
void OnClipCheckBox(wxCommandEvent &evt)
Definition: Amplify.cpp:281
wxSlider * mAmpS
Definition: Amplify.h:56
void OnAmpSlider(wxCommandEvent &evt)
Definition: Amplify.cpp:259
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
Definition: Amplify.cpp:74
std::unique_ptr< EffectEditor > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
Add controls to effect panel; always succeeds.
Definition: Amplify.cpp:81
bool TransferDataToWindow(const EffectSettings &settings) override
Definition: Amplify.cpp:165
bool TransferDataFromWindow(EffectSettings &settings) override
Definition: Amplify.cpp:180
wxCheckBox * mClip
Definition: Amplify.h:59
void OnAmpText(wxCommandEvent &evt)
Definition: Amplify.cpp:216
TranslatableString GetDescription() const override
Definition: Amplify.cpp:68
void OnPeakText(wxCommandEvent &evt)
Definition: Amplify.cpp:234
ComponentInterfaceSymbol GetSymbol() const override
Definition: Amplify.cpp:63
wxTextCtrl * mAmpT
Definition: Amplify.h:57
void CheckClip()
Definition: Amplify.cpp:210
Performs effect computation.
Hold values to send to effect output meters.
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Holds a msgid for the translation catalog; may also bind format arguments.
Externalized state of a plug-in.