28 const auto duration =
settings.extra.GetDuration();
35 bool bGoodResult =
true;
38 outputs.Get().Any().VisitWhile(bGoodResult,
39 [&](
auto &&fallthrough){
return [&](
WaveTrack &track) {
40 if (!track.GetSelected())
46 if (!editClipCanMove &&
47 track.IsEmpty(
mT0,
mT1 + 1.0 / track.GetRate()) &&
49 mT0 + duration - (
mT1 -
mT0) - 1.0 / track.GetRate()))
53 XO(
"There is not enough room available to generate the audio"),
61 auto copy = track.EmptyCopy();
69 const auto &selectedRegion =
75 constexpr auto preserve =
true;
76 constexpr auto merge =
true;
78 selectedRegion.t0(), selectedRegion.t1(), *
copy, preserve,
93 t.SyncLockAdjust(
mT1,
mT0 + duration);
Toolkit-neutral facade for basic user interface services.
Contains declarations for TimeWarper, IdentityTimeWarper, ShiftTimeWarper, LinearTimeWarper,...
static Settings & settings()
bool GetEditClipsCanMove()
std::shared_ptr< TrackList > mTracks
const AudacityProject * FindProject() const
virtual EffectType GetType() const =0
Type determines how it behaves.
Performs effect computation.
Use this object to copy the input tracks to tentative outputTracks.
virtual bool GenerateTrack(const EffectSettings &settings, WaveTrack &tmp)=0
GenerateTrack() must be overridden by the actual generator class.
bool Process(EffectInstance &instance, EffectSettings &settings) override
Unit slope but with either a jump (pasting more) or a flat interval (pasting less)
static bool IsSyncLockSelected(const Track &track)
Abstract base class for an object holding data associated with points on a time axis.
NotifyingSelectedRegion selectedRegion
static ViewInfo & Get(AudacityProject &project)
A Track that contains audio waveform data.
MessageBoxResult ShowMessageBox(const TranslatableString &message, MessageBoxOptions options={})
Show a modal message box with either Ok or Yes and No, and optionally Cancel.
void copy(const T *src, T *dst, int32_t n)
MessageBoxOptions && IconStyle(Icon style) &&
Externalized state of a plug-in.