Audacity  2.2.0
EffectManager Class Reference

EffectManager is the class that handles effects and effect categories. More...

#include <EffectManager.h>

Classes

struct  UnsetBatchProcessing
 

Public Member Functions

 EffectManager ()
 
virtual ~EffectManager ()
 
const PluginIDRegisterEffect (Effect *f)
 
void UnregisterEffect (const PluginID &ID)
 
bool DoEffect (const PluginID &ID, wxWindow *parent, double projectRate, TrackList *list, TrackFactory *factory, SelectedRegion *selectedRegion, bool shouldPrompt=true)
 
wxString GetEffectName (const PluginID &ID)
 
wxString GetEffectIdentifier (const PluginID &ID)
 
wxString GetEffectDescription (const PluginID &ID)
 
bool IsHidden (const PluginID &ID)
 
bool SupportsAutomation (const PluginID &ID)
 
wxString GetEffectParameters (const PluginID &ID)
 
bool SetEffectParameters (const PluginID &ID, const wxString &params)
 
bool PromptUser (const PluginID &ID, wxWindow *parent)
 
bool HasPresets (const PluginID &ID)
 
wxString GetPreset (const PluginID &ID, const wxString &params, wxWindow *parent)
 
wxString GetDefaultPreset (const PluginID &ID)
 
BatchProcessingScope SetBatchProcessing (const PluginID &ID)
 
void SetSkipStateFlag (bool flag)
 
bool GetSkipStateFlag ()
 
bool RealtimeIsActive ()
 
bool RealtimeIsSuspended ()
 
void RealtimeAddEffect (Effect *effect)
 
void RealtimeRemoveEffect (Effect *effect)
 
void RealtimeSetEffects (const EffectArray &mActive)
 
void RealtimeInitialize (double rate)
 
void RealtimeAddProcessor (int group, unsigned chans, float rate)
 
void RealtimeFinalize ()
 
void RealtimeSuspend ()
 
void RealtimeResume ()
 
void RealtimeProcessStart ()
 
size_t RealtimeProcess (int group, unsigned chans, float **buffers, size_t numSamples)
 
void RealtimeProcessEnd ()
 
int GetRealtimeLatency ()
 
const PluginIDGetEffectByIdentifier (const wxString &strTarget)
 

Static Public Member Functions

static EffectManagerGet ()
 

Private Types

using BatchProcessingScope = std::unique_ptr< EffectManager, UnsetBatchProcessing >
 

Private Member Functions

void SetBatchProcessing (const PluginID &ID, bool start)
 
EffectGetEffect (const PluginID &ID)
 

Private Attributes

EffectMap mEffects
 
EffectOwnerMap mHostEffects
 
int mNumEffects
 
wxCriticalSection mRealtimeLock
 
EffectArray mRealtimeEffects
 
int mRealtimeLatency
 
bool mRealtimeSuspended
 
bool mRealtimeActive
 
std::vector< unsigned > mRealtimeChans
 
wxArrayDouble mRealtimeRates
 
bool mSkipStateFlag
 

Detailed Description

EffectManager is the class that handles effects and effect categories.

It maintains a graph of effect categories and subcategories, registers and unregisters effects and can return filtered lists of effects.

Member Typedef Documentation

Constructor & Destructor Documentation

EffectManager::EffectManager ( )
EffectManager::~EffectManager ( )
virtual

Member Function Documentation

bool EffectManager::DoEffect ( const PluginID ID,
wxWindow *  parent,
double  projectRate,
TrackList list,
TrackFactory factory,
SelectedRegion selectedRegion,
bool  shouldPrompt = true 
)

Run an effect given the plugin ID

References Effect::DoEffect(), GetEffect(), SetSkipStateFlag(), and Effect::SupportsRealtime().

Referenced by AudacityProject::OnEffect().

wxString EffectManager::GetEffectDescription ( const PluginID ID)

References _(), GetEffect(), and GetEffectName().

Referenced by AudacityProject::OnEffect().

wxString EffectManager::GetEffectIdentifier ( const PluginID ID)
wxString EffectManager::GetEffectName ( const PluginID ID)
wxString EffectManager::GetEffectParameters ( const PluginID ID)
wxString EffectManager::GetPreset ( const PluginID ID,
const wxString &  params,
wxWindow *  parent 
)
int EffectManager::GetRealtimeLatency ( )

References mRealtimeLatency.

bool EffectManager::GetSkipStateFlag ( )

References mSkipStateFlag.

Referenced by AudacityProject::OnEffect().

bool EffectManager::IsHidden ( const PluginID ID)
bool EffectManager::PromptUser ( const PluginID ID,
wxWindow *  parent 
)
void EffectManager::RealtimeAddProcessor ( int  group,
unsigned  chans,
float  rate 
)

References mRealtimeChans, and mRealtimeRates.

Referenced by AudioIO::StartStream().

void EffectManager::RealtimeFinalize ( )
void EffectManager::RealtimeInitialize ( double  rate)
bool EffectManager::RealtimeIsActive ( )
bool EffectManager::RealtimeIsSuspended ( )

References mRealtimeSuspended.

size_t EffectManager::RealtimeProcess ( int  group,
unsigned  chans,
float **  buffers,
size_t  numSamples 
)
void EffectManager::RealtimeProcessEnd ( )

References mRealtimeLock, and mRealtimeSuspended.

Referenced by audacityAudioCallback().

void EffectManager::RealtimeProcessStart ( )

References mRealtimeLock, and mRealtimeSuspended.

Referenced by audacityAudioCallback().

void EffectManager::RealtimeRemoveEffect ( Effect effect)
void EffectManager::RealtimeResume ( )
void EffectManager::RealtimeSetEffects ( const EffectArray mActive)
void EffectManager::RealtimeSuspend ( )
const PluginID & EffectManager::RegisterEffect ( Effect f)

(Un)Register an effect so it can be executed.

References PluginManager::Get(), mEffects, and PluginManager::RegisterPlugin().

void EffectManager::SetBatchProcessing ( const PluginID ID,
bool  start 
)
private
BatchProcessingScope EffectManager::SetBatchProcessing ( const PluginID ID)
inline
bool EffectManager::SetEffectParameters ( const PluginID ID,
const wxString &  params 
)
void EffectManager::SetSkipStateFlag ( bool  flag)

Allow effects to disable saving the state at run time

References mSkipStateFlag.

Referenced by DoEffect(), EffectNoiseReduction::Dialog::OnGetProfile(), and NyquistEffect::Process().

bool EffectManager::SupportsAutomation ( const PluginID ID)
void EffectManager::UnregisterEffect ( const PluginID ID)

Member Data Documentation

EffectMap EffectManager::mEffects
private
EffectOwnerMap EffectManager::mHostEffects
private

Referenced by GetEffect().

int EffectManager::mNumEffects
private
bool EffectManager::mRealtimeActive
private
std::vector<unsigned> EffectManager::mRealtimeChans
private
EffectArray EffectManager::mRealtimeEffects
private
int EffectManager::mRealtimeLatency
private
wxCriticalSection EffectManager::mRealtimeLock
private
wxArrayDouble EffectManager::mRealtimeRates
private
bool EffectManager::mSkipStateFlag
private

The documentation for this class was generated from the following files: