29#include <wx/checkbox.h>
32#include <wx/stattext.h>
33#include <wx/textctrl.h>
34#include <wx/valtext.h>
42#include "../widgets/valnum.h"
71 return XO(
"Increases or decreases the volume of the audio you have selected");
87 enum{ precision = 3 };
113 S.StartVerticalLay(0);
116 S.StartMultiColumn(2, wxCENTER);
119 .Validator<FloatingPointValidator<double>>(
121 .AddTextBox(
XXO(
"&Amplification (dB):"), L
"", 12);
126 S.StartHorizontalLay(wxEXPAND);
129 .Style(wxSL_HORIZONTAL)
130 .Name(
XO(
"Amplification dB"))
133 S.EndHorizontalLay();
136 S.StartMultiColumn(2, wxCENTER);
139 .Validator<FloatingPointValidator<double>>(
143 &
mNewPeak, NumValidatorStyle::ONE_TRAILING_ZERO,
147 .AddTextBox(
XXO(
"&New Peak Amplitude (dB):"), L
"", 12);
152 S.StartHorizontalLay(wxCENTER);
156 .AddCheckBox(
XXO(
"Allo&w clipping"),
false);
158 S.EndHorizontalLay();
167 mAmpT->GetValidator()->TransferToWindow();
171 mNewPeakT->GetValidator()->TransferToWindow();
205 return std::make_shared<Instance>(
const_cast<EffectAmplify&
>(*
this));
218 if (!
mAmpT->GetValidator()->TransferFromWindow())
229 mNewPeakT->GetValidator()->TransferToWindow();
236 if (!
mNewPeakT->GetValidator()->TransferFromWindow())
252 mAmpT->GetValidator()->TransferToWindow();
261 double dB = evt.GetInt() /
Amp.
scale;
264 double dB2 = (evt.GetInt() - 1) /
Amp.
scale;
273 mAmpT->GetValidator()->TransferToWindow();
276 mNewPeakT->GetValidator()->TransferToWindow();
XXO("&Cut/Copy/Paste Toolbar")
static constexpr EffectParameter Amp
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
An Effect that makes a sound louder or softer.
wxWeakRef< wxWindow > mUIParent
std::shared_ptr< EffectInstance > MakeInstance() const override
Make an object maintaining short-term state of an Effect.
void OnClipCheckBox(wxCommandEvent &evt)
void OnAmpSlider(wxCommandEvent &evt)
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
std::unique_ptr< EffectEditor > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
Add controls to effect panel; always succeeds.
bool TransferDataToWindow(const EffectSettings &settings) override
bool TransferDataFromWindow(EffectSettings &settings) override
void OnAmpText(wxCommandEvent &evt)
TranslatableString GetDescription() const override
void OnPeakText(wxCommandEvent &evt)
static bool EnableApply(wxWindow *parent, bool enable=true)
Enable or disable the Apply button of the dialog that contains parent.
bool IsBatchProcessing() const override
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.
Holds a msgid for the translation catalog; may also bind format arguments.
BuiltinEffectsModule::Registration< EffectAmplify > reg
const Type scale
Scaling factor, for slider control.
const Type min
Minimum value.
const Type max
Maximum value.
Externalized state of a plug-in.