Audacity 3.2.0
Public Member Functions | List of all members
EffectInstance Class Referenceabstract

Performs effect computation. More...

#include <EffectInterface.h>

Inheritance diagram for EffectInstance:
[legend]
Collaboration diagram for EffectInstance:
[legend]

Public Member Functions

virtual ~EffectInstance ()
 
virtual bool Init ()
 Call once to set up state for whole list of tracks to be processed. More...
 
virtual bool Process (EffectSettings &settings)=0
 Actually do the effect here. More...
 
virtual void SetSampleRate (double rate)=0
 
virtual size_t GetBlockSize () const =0
 
virtual size_t SetBlockSize (size_t maxBlockSize)=0
 
virtual bool RealtimeInitialize (EffectSettings &settings)
 
virtual bool RealtimeAddProcessor (EffectSettings &settings, unsigned numChannels, float sampleRate)
 
virtual bool RealtimeSuspend ()
 
virtual bool RealtimeResume () noexcept
 
virtual bool RealtimeProcessStart (EffectSettings &settings)
 settings are possibly changed, since last call, by an asynchronous dialog More...
 
virtual size_t RealtimeProcess (int group, EffectSettings &settings, const float *const *inBuf, float *const *outBuf, size_t numSamples)
 
virtual bool RealtimeProcessEnd (EffectSettings &settings) noexcept
 settings can be updated to let a dialog change appearance at idle More...
 
virtual bool RealtimeFinalize (EffectSettings &settings) noexcept
 
virtual size_t GetTailSize () const
 

Detailed Description

Performs effect computation.

Definition at line 345 of file EffectInterface.h.

Constructor & Destructor Documentation

◆ ~EffectInstance()

EffectInstance::~EffectInstance ( )
virtualdefault

Member Function Documentation

◆ GetBlockSize()

virtual size_t EffectInstance::GetBlockSize ( ) const
pure virtual

◆ GetTailSize()

size_t EffectInstance::GetTailSize ( ) const
virtual

Function that has not yet found a use Correct definitions of it will likely depend on settings and state

Definition at line 152 of file EffectInterface.cpp.

153{
154 return 0;
155}

◆ Init()

bool EffectInstance::Init ( )
virtual

Call once to set up state for whole list of tracks to be processed.

Returns
success Default implementation does nothing, returns true

Reimplemented in StatefulEffectBase::Instance, and StatefulEffectBase::Instance.

Definition at line 106 of file EffectInterface.cpp.

107{
108 return true;
109}

◆ Process()

virtual bool EffectInstance::Process ( EffectSettings settings)
pure virtual

Actually do the effect here.

Returns
success

Implemented in PerTrackEffect::Instance, and StatefulEffect::Instance.

◆ RealtimeAddProcessor()

bool EffectInstance::RealtimeAddProcessor ( EffectSettings settings,
unsigned  numChannels,
float  sampleRate 
)
virtual
Returns
success Default implementation does nothing, returns true

Reimplemented in StatefulEffectBase::Instance, LadspaEffect::Instance, EffectReverb::Instance, StatefulEffectBase::Instance, and EffectWahwah::Instance.

Definition at line 116 of file EffectInterface.cpp.

117{
118 return true;
119}

◆ RealtimeFinalize()

bool EffectInstance::RealtimeFinalize ( EffectSettings settings)
virtualnoexcept
Returns
success Default implementation does nothing, returns true

Reimplemented in StatefulEffectBase::Instance, LadspaEffect::Instance, EffectReverb::Instance, StatefulEffectBase::Instance, and EffectWahwah::Instance.

Definition at line 147 of file EffectInterface.cpp.

148{
149 return true;
150}

◆ RealtimeInitialize()

bool EffectInstance::RealtimeInitialize ( EffectSettings settings)
virtual
Returns
success Default implementation does nothing, returns false (so assume realtime is not supported). Other member functions related to realtime return true or zero, but will not be called, unless a derived class overrides RealtimeInitialize.

Reimplemented in StatefulEffectBase::Instance, LadspaEffect::Instance, EffectReverb::Instance, StatefulEffectBase::Instance, and EffectWahwah::Instance.

Definition at line 111 of file EffectInterface.cpp.

112{
113 return false;
114}

◆ RealtimeProcess()

size_t EffectInstance::RealtimeProcess ( int  group,
EffectSettings settings,
const float *const *  inBuf,
float *const *  outBuf,
size_t  numSamples 
)
virtual
Returns
success Default implementation does nothing, returns 0

Reimplemented in StatefulEffectBase::Instance, LadspaEffect::Instance, EffectReverb::Instance, StatefulEffectBase::Instance, and EffectWahwah::Instance.

Definition at line 136 of file EffectInterface.cpp.

138{
139 return 0;
140}

◆ RealtimeProcessEnd()

bool EffectInstance::RealtimeProcessEnd ( EffectSettings settings)
virtualnoexcept

settings can be updated to let a dialog change appearance at idle

Returns
success Default implementation does nothing, returns true

Reimplemented in StatefulEffectBase::Instance, LadspaEffect::Instance, and StatefulEffectBase::Instance.

Definition at line 142 of file EffectInterface.cpp.

143{
144 return true;
145}

◆ RealtimeProcessStart()

bool EffectInstance::RealtimeProcessStart ( EffectSettings settings)
virtual

settings are possibly changed, since last call, by an asynchronous dialog

Returns
success Default implementation does nothing, returns true

Reimplemented in StatefulEffectBase::Instance, LadspaEffect::Instance, and StatefulEffectBase::Instance.

Definition at line 131 of file EffectInterface.cpp.

132{
133 return true;
134}

◆ RealtimeResume()

bool EffectInstance::RealtimeResume ( )
virtualnoexcept
Returns
success Default implementation does nothing, returns true

Reimplemented in StatefulEffectBase::Instance, LadspaEffect::Instance, and StatefulEffectBase::Instance.

Definition at line 126 of file EffectInterface.cpp.

127{
128 return true;
129}

◆ RealtimeSuspend()

bool EffectInstance::RealtimeSuspend ( )
virtual
Returns
success Default implementation does nothing, returns true

Reimplemented in StatefulEffectBase::Instance, LadspaEffect::Instance, and StatefulEffectBase::Instance.

Definition at line 121 of file EffectInterface.cpp.

122{
123 return true;
124}

◆ SetBlockSize()

virtual size_t EffectInstance::SetBlockSize ( size_t  maxBlockSize)
pure virtual

Implemented in EffectInstanceWithBlockSize, StatefulEffectBase::Instance, and StatefulEffectBase::Instance.

Referenced by PerTrackEffect::ProcessPass().

Here is the caller graph for this function:

◆ SetSampleRate()

virtual void EffectInstance::SetSampleRate ( double  rate)
pure virtual

Implemented in EffectInstanceWithSampleRate, StatefulEffectBase::Instance, and StatefulEffectBase::Instance.

Referenced by PerTrackEffect::ProcessPass().

Here is the caller graph for this function:

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