36 return XO(
"Repeats the selection the specified number of times");
60 bool bGoodResult =
true;
61 double maxDestLen = 0.0;
63 outputs.Get().Any().VisitWhile(
72 [&](
auto&& fallthrough) {
76 auto start = track.TimeToLongSamples(
mT0);
77 auto end = track.TimeToLongSamples(
mT1);
78 auto len =
end - start;
79 const double tLen = track.LongSamplesToTime(len);
80 const double tc =
mT0 + tLen;
86 std::static_pointer_cast<WaveTrack>(track.
Copy(
mT0,
mT1));
97 track.
Paste(t0, *firstTemp);
103 const auto compareIntervals = [](
const auto& a,
const auto& b) {
104 return a->Start() < b->Start();
107 const auto eps = 0.5 / track.GetRate();
108 auto sortedIntervals =
110 auto sourceIntervals = std::vector(
111 firstTemp->Intervals().begin(), firstTemp->Intervals().end());
113 sortedIntervals.begin(), sortedIntervals.end(),
116 sourceIntervals.begin(), sourceIntervals.end(),
118 for (
auto it = sortedIntervals.begin(); it != sortedIntervals.end();
121 const auto& interval = *it;
123 if (std::abs((*it)->GetPlayStartTime() - tc) > eps)
129 for (
const auto& src : sourceIntervals)
131 if (it == sortedIntervals.end())
133 (*it++)->SetName(src->GetName());
Generates EffectParameterMethods overrides from variadic template arguments.
IteratorRange< IntervalIterator< IntervalType > > Intervals()
Get range of intervals with mutative access.
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
void SetLinearEffectFlag(bool linearEffectFlag)
std::shared_ptr< TrackList > mTracks
bool TrackProgress(int whichTrack, double frac, const TranslatableString &={}) const
Performs effect computation.
Use this object to copy the input tracks to tentative outputTracks.
Interface for manipulations of an Effect's settings.
virtual void Reset(Effect &effect) const =0
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
Weak precondition allows overrides to replicate one channel into many.
Track::Holder Copy(double t0, double t1, bool forClipboard=true) const override
Create new tracks and don't modify this track.
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
bool NeedsDither() const override
TranslatableString GetDescription() const override
const EffectParameterMethods & Parameters() const override
EffectType GetType() const override
Type determines how it behaves.
ComponentInterfaceSymbol GetSymbol() const override
bool Process(EffectInstance &instance, EffectSettings &settings) override
static const ComponentInterfaceSymbol Symbol
static bool IsSelectedOrSyncLockSelected(const Track &track)
static bool IsSyncLockSelected(const Track &track)
Abstract base class for an object holding data associated with points on a time axis.
bool GetSelected() const
Selectedness is always the same for all channels of a group.
Holds a msgid for the translation catalog; may also bind format arguments.
A Track that contains audio waveform data.
const char * end(const char *str) noexcept
Externalized state of a plug-in.