49 XO(
"This plugin could not be loaded.\nIt may have been deleted."),
68 auto nTracksOriginally =
tracks.Size();
77 auto cleanup =
finally([&] {
88 bool anyTracks = !range.empty();
89 bool clean = std::all_of(range.begin(), range.end(), [](
const WaveTrack* t) {
90 return t->GetEndTime() == 0;
102 std::make_shared<SimpleEffectSettingsAccess>(*pSettings);
103 const auto finder = [effect, pAccess, flags,
104 cb = std::move(showEffectHostInterfaceCb)](
106 -> std::optional<std::shared_ptr<EffectInstanceEx>> {
110 std::shared_ptr<EffectInstance> pInstance;
111 std::shared_ptr<EffectInstanceEx> pInstanceEx;
114 if (!cb(*effect, pInstance, *pAccess))
116 else if (!(pInstanceEx =
117 std::dynamic_pointer_cast<EffectInstanceEx>(
124 return { pInstanceEx };
127 success = effect->DoEffect(
144 const auto longDesc =
XO(
"Applied effect: %s").Format(shortDesc);
154 auto lastEffectDesc =
XO(
"Repeat %s").Format(shortDesc);
158 commandManager.Modify(
wxT(
"RepeatLastGenerator"), lastEffectDesc);
159 commandManager.mLastGenerator = ID;
163 commandManager.Modify(
wxT(
"RepeatLastEffect"), lastEffectDesc);
164 commandManager.mLastEffect = ID;
168 commandManager.Modify(
wxT(
"RepeatLastAnalyzer"), lastEffectDesc);
169 commandManager.mLastAnalyzer = ID;
170 commandManager.mLastAnalyzerRegistration =
175 commandManager.Modify(
wxT(
"RepeatLastTool"), lastEffectDesc);
176 commandManager.mLastTool = ID;
177 commandManager.mLastToolRegistration =
182 commandManager.mRepeatToolFlags =
196 if (!anyTracks || (clean && selectedRegion.t0() == 0.0))
197 viewport.ZoomFitHorizontally();
212 if (
tracks.Size() > nTracksOriginally)
214 viewport.ScrollToBottom();
218 auto pTrack = *
tracks.Selected().begin();
Toolkit-neutral facade for basic user interface services.
#define NYQUIST_PROMPT_NAME
an object holding per-project preferred sample rate
static Settings & settings()
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
static CommandManager & Get(AudacityProject &project)
void UpdateMenus(bool checkActive=true)
Base class for many of the effects in Audacity.
EffectManager is the class that handles effects and effect categories.
void SetSkipStateFlag(bool flag)
EffectPlugin * GetEffect(const PluginID &ID)
static EffectManager & Get()
EffectSettings * GetDefaultSettings(const PluginID &ID)
EffectType GetEffectType() const
TranslatableString GetName(const PluginID &ID) const
static bool IsPluginAvailable(const PluginDescriptor &plug)
const PluginDescriptor * GetPlugin(const PluginID &ID) const
static PluginManager & Get()
void PushState(const TranslatableString &desc, const TranslatableString &shortDesc)
static ProjectHistory & Get(AudacityProject &project)
static ProjectRate & Get(AudacityProject &project)
static TrackList & Get(AudacityProject &project)
NotifyingSelectedRegion selectedRegion
static ViewInfo & Get(AudacityProject &project)
void ShowTrack(const Track &track)
static Viewport & Get(AudacityProject &project)
static WaveTrackFactory & Get(AudacityProject &project)
A Track that contains audio waveform data.
std::function< void()> SelectAllIfNoneCb
AUDACITY_APPLICATION_LOGIC_API bool DoEffect(const PluginID &ID, AudacityProject &project, unsigned flags, ShowEffectHostInterfaceCb, StopPlaybackCb, SelectAllIfNoneCb)
'Repeat Last Effect'.
std::function< bool(Effect &, std::shared_ptr< EffectInstance > &, SimpleEffectSettingsAccess &)> ShowEffectHostInterfaceCb
std::function< void()> StopPlaybackCb
MessageBoxResult ShowMessageBox(const TranslatableString &message, MessageBoxOptions options={})
Show a modal message box with either Ok or Yes and No, and optionally Cancel.
Externalized state of a plug-in.