30#include <wx/stattext.h>
32#include "../LabelTrack.h"
33#include "../ShuttleGui.h"
34#include "../SyncLock.h"
35#include "../WaveTrack.h"
36#include "../widgets/NumericTextCtrl.h"
37#include "../widgets/valnum.h"
60 Parameters().Reset(*
this);
61 SetLinearEffectFlag(
true);
77 return XO(
"Repeats the selection the specified number of times");
101 bool bGoodResult =
true;
102 double maxDestLen = 0.0;
116 return fallthrough();
117 auto start = track->TimeToLongSamples(
mT0);
118 auto end = track->TimeToLongSamples(
mT1);
119 auto len =
end - start;
120 double tLen = track->LongSamplesToTime(len);
121 double tc =
mT0 + tLen;
134 track->
Paste(tc, dest.get());
161 S.StartHorizontalLay(wxCENTER,
false);
166 .AddTextBox(
XXO(
"&Number of repeats to add:"), L
"", 12);
168 S.EndHorizontalLay();
170 S.StartMultiColumn(1, wxCENTER);
173 XO(
"Current selection length: dd:hh:mm:ss"));
174 mTotalTime =
S.AddVariableText(
XO(
"New selection length: dd:hh:mm:ss"));
211 str = wxString::Format(
_(
"Current selection length: %s"), nc.
GetString() );
221 str = wxString::Format(
_(
"New selection length: %s"), nc.
GetString() );
224 str =
_(
"Warning: No repeats.");
Generates EffectParameterMethods overrides from variadic template arguments.
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
std::shared_ptr< TrackList > mOutputTracks
void ReplaceProcessedTracks(const bool bGoodResult)
void CopyInputTracks(bool allSyncLockSelected=false)
bool EnableApply(bool enable=true)
virtual NumericFormatSymbol GetSelectionFormat()
bool TrackProgress(int whichTrack, double frac, const TranslatableString &={}) const
Performs effect computation.
Interface for manipulations of an Effect's settings.
An Effect that repeats audio several times over.
ComponentInterfaceSymbol GetSymbol() const override
std::unique_ptr< EffectUIValidator > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access) override
Add controls to effect panel; always succeeds.
wxStaticText * mTotalTime
bool Process(EffectInstance &instance, EffectSettings &settings) override
Actually do the effect here.
static const ComponentInterfaceSymbol Symbol
const EffectParameterMethods & Parameters() const override
wxTextCtrl * mRepeatCount
bool TransferDataToWindow(const EffectSettings &settings) override
Update controls for the settings.
TranslatableString GetDescription() const override
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
void OnRepeatTextChange(wxCommandEvent &evt)
static constexpr EffectParameter Count
bool TransferDataFromWindow(EffectSettings &settings) override
Update the given settings from controls.
EffectType GetType() const override
Type determines how it behaves.
wxStaticText * mCurrentTime
A LabelTrack is a Track that holds labels (LabelStruct).
bool Repeat(double t0, double t1, int n)
void Paste(double t, const Track *src) override
Track::Holder Copy(double t0, double t1, bool forClipboard=true) const override
NumericConverter provides the advanced formatting control used in the selection bar of Audacity.
void SetValue(double newValue)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
static bool IsSelectedOrSyncLockSelected(const Track *pTrack)
static bool IsSyncLockSelected(const Track *pTrack)
Abstract base class for an object holding data associated with points on a time axis.
Continuation<> Fallthrough
Type of arguments passed as optional second parameter to TypeSwitch<void>() cases.
Holds a msgid for the translation catalog; may also bind format arguments.
A Track that contains audio waveform data.
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
BuiltinEffectsModule::Registration< EffectRepeat > reg
const Type min
Minimum value.
Externalized state of a plug-in.