mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-16 08:34:10 +02:00
AudacityProject::OnEffect wraps new function DoEffect
This commit is contained in:
parent
6dead232f2
commit
77c392d29c
@ -611,7 +611,7 @@ bool BatchCommands::ApplyEffectCommand(const PluginID & ID, const wxString & com
|
||||
if (EffectManager::Get().SetEffectParameters(ID, params))
|
||||
{
|
||||
// and apply the effect...
|
||||
res = project->OnEffect(ID, AudacityProject::OnEffectFlags::kConfigured |
|
||||
res = project->DoEffect(ID, AudacityProject::OnEffectFlags::kConfigured |
|
||||
AudacityProject::OnEffectFlags::kSkipState |
|
||||
AudacityProject::OnEffectFlags::kDontRepeatLast);
|
||||
}
|
||||
|
@ -4293,11 +4293,11 @@ void AudacityProject::OnZeroCrossing()
|
||||
// Effect Menus
|
||||
//
|
||||
|
||||
/// OnEffect() takes a PluginID and has the EffectManager execute the assocated effect.
|
||||
/// DoEffect() takes a PluginID and has the EffectManager execute the assocated effect.
|
||||
///
|
||||
/// At the moment flags are used only to indicate whether to prompt for parameters,
|
||||
/// whether to save the state to history and whether to allow 'Repeat Last Effect'.
|
||||
bool AudacityProject::OnEffect(const PluginID & ID, int flags)
|
||||
bool AudacityProject::DoEffect(const PluginID & ID, int flags)
|
||||
{
|
||||
const PluginDescriptor *plug = PluginManager::Get().GetPlugin(ID);
|
||||
if (!plug)
|
||||
@ -4424,6 +4424,11 @@ bool AudacityProject::OnEffect(const PluginID & ID, int flags)
|
||||
return true;
|
||||
}
|
||||
|
||||
void AudacityProject::OnEffect(const PluginID & ID, int flags)
|
||||
{
|
||||
DoEffect(ID, flags);
|
||||
}
|
||||
|
||||
void AudacityProject::OnRepeatLastEffect(int WXUNUSED(index))
|
||||
{
|
||||
if (!mLastEffect.IsEmpty())
|
||||
|
@ -484,7 +484,8 @@ public:
|
||||
static const int kDontRepeatLast = 0x04;
|
||||
};
|
||||
|
||||
bool OnEffect(const PluginID & ID, int flags = OnEffectFlags::kNone);
|
||||
bool DoEffect(const PluginID & ID, int flags);
|
||||
void OnEffect(const PluginID & ID, int);
|
||||
void OnRepeatLastEffect(int index);
|
||||
void OnApplyChain();
|
||||
void OnEditChains();
|
||||
|
@ -120,7 +120,7 @@ private:
|
||||
};
|
||||
|
||||
template<typename OBJ>
|
||||
using audCommandPluginFunction = bool (OBJ::*)(const PluginID &, int);
|
||||
using audCommandPluginFunction = void (OBJ::*)(const PluginID &, int);
|
||||
|
||||
template<typename OBJ>
|
||||
class PluginFunctor final : public CommandFunctor
|
||||
|
@ -1560,7 +1560,7 @@ bool CommandManager::HandleTextualCommand(const wxString & Str, CommandFlag flag
|
||||
{
|
||||
if (em.GetEffectIdentifier(plug->GetID()).IsSameAs(Str))
|
||||
{
|
||||
return proj->OnEffect(plug->GetID(), AudacityProject::OnEffectFlags::kConfigured);
|
||||
return proj->DoEffect(plug->GetID(), AudacityProject::OnEffectFlags::kConfigured);
|
||||
}
|
||||
plug = pm.GetNextPlugin(PluginTypeEffect);
|
||||
}
|
||||
|
@ -765,7 +765,7 @@ bool Effect::Apply()
|
||||
// This is absolute hackage...but easy and I can't think of another way just now.
|
||||
//
|
||||
// It should callback to the EffectManager to kick off the processing
|
||||
return GetActiveProject()->OnEffect(GetID(), AudacityProject::OnEffectFlags::kConfigured);
|
||||
return GetActiveProject()->DoEffect(GetID(), AudacityProject::OnEffectFlags::kConfigured);
|
||||
}
|
||||
|
||||
void Effect::Preview()
|
||||
|
Loading…
x
Reference in New Issue
Block a user