Audacity 3.2.0
Public Member Functions | Protected Member Functions | List of all members
StatefulPerTrackEffect::Instance Class Reference

#include <StatefulPerTrackEffect.h>

Inheritance diagram for StatefulPerTrackEffect::Instance:
[legend]
Collaboration diagram for StatefulPerTrackEffect::Instance:
[legend]

Public Member Functions

 Instance (StatefulPerTrackEffect &effect)
 
 ~Instance () override
 
bool ProcessInitialize (EffectSettings &settings, double sampleRate, ChannelNames chanMap) override
 
bool ProcessFinalize () noexcept override
 
size_t ProcessBlock (EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen) override
 Called for destructive effect computation. More...
 
- Public Member Functions inherited from StatefulEffectBase::Instance
 Instance (StatefulEffectBase &effect)
 
 ~Instance () override
 
bool Init () override
 Call once to set up state for whole list of tracks to be processed. More...
 
size_t GetBlockSize () const override
 
size_t SetBlockSize (size_t maxBlockSize) override
 
bool RealtimeInitialize (EffectSettings &settings, double sampleRate) override
 
bool RealtimeAddProcessor (EffectSettings &settings, EffectOutputs *pOutputs, unsigned numChannels, float sampleRate) override
 
bool RealtimeSuspend () override
 
bool RealtimeResume () override
 
bool RealtimeProcessStart (MessagePackage &package) override
 settings are possibly changed, since last call, by an asynchronous dialog More...
 
size_t RealtimeProcess (size_t group, EffectSettings &settings, const float *const *inBuf, float *const *outBuf, size_t numSamples) override
 
bool RealtimeProcessEnd (EffectSettings &settings) noexcept override
 settings can be updated to let a dialog change appearance at idle More...
 
bool RealtimeFinalize (EffectSettings &settings) noexcept override
 
unsigned GetAudioInCount () const override
 How many input buffers to allocate at once. More...
 
unsigned GetAudioOutCount () const override
 How many output buffers to allocate at once. More...
 
bool NeedsDither () const override
 
bool ProcessInitialize (EffectSettings &settings, double sampleRate, ChannelNames chanMap) override
 
bool ProcessFinalize () noexcept override
 
- Public Member Functions inherited from EffectInstanceEx
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...
 
 ~EffectInstanceEx () override
 
- Public Member Functions inherited from EffectInstance
virtual ~EffectInstance ()
 
virtual size_t GetBlockSize () const =0
 
virtual size_t SetBlockSize (size_t maxBlockSize)=0
 
virtual unsigned GetAudioInCount () const =0
 How many input buffers to allocate at once. More...
 
virtual unsigned GetAudioOutCount () const =0
 How many output buffers to allocate at once. More...
 
virtual bool RealtimeInitialize (EffectSettings &settings, double sampleRate)
 
virtual bool RealtimeAddProcessor (EffectSettings &settings, EffectOutputs *pOutputs, unsigned numChannels, float sampleRate)
 
virtual bool RealtimeSuspend ()
 
virtual bool RealtimeResume ()
 
virtual std::unique_ptr< MessageMakeMessage () const
 Called on the main thread, in which the result may be cloned. More...
 
virtual bool UsesMessages () const noexcept
 
virtual bool RealtimeProcessStart (MessagePackage &package)
 settings are possibly changed, since last call, by an asynchronous dialog More...
 
virtual size_t RealtimeProcess (size_t group, EffectSettings &settings, const float *const *inBuf, float *const *outBuf, size_t numSamples)
 
virtual void RealtimePassThrough (size_t group, EffectSettings &settings, const float *const *inBuf, size_t numSamples)
 Called instead of RealtimeProcess when the effect is bypassed. Default implementation does nothing. More...
 
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
 
virtual SampleCount GetLatency (const EffectSettings &settings, double sampleRate) const
 
virtual bool NeedsDither () const
 
virtual bool ProcessInitialize (EffectSettings &settings, double sampleRate, ChannelNames chanMap)=0
 
virtual bool ProcessFinalize () noexcept=0
 
virtual size_t ProcessBlock (EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen)=0
 Called for destructive effect computation. More...
 
- Public Member Functions inherited from PerTrackEffect::Instance
 Instance (const PerTrackEffect &processor)
 
 ~Instance () override
 
bool Process (EffectSettings &settings) final
 Uses the other virtual functions of this class. More...
 
bool ProcessInitialize (EffectSettings &settings, double sampleRate, ChannelNames chanMap) override
 
bool ProcessFinalize () noexcept override
 

Protected Member Functions

StatefulPerTrackEffectGetEffect () const
 
- Protected Member Functions inherited from StatefulEffectBase::Instance
StatefulEffectBaseGetEffect () const
 

Additional Inherited Members

- Public Types inherited from EffectInstance
using Message = EffectSettingsAccess::Message
 
using SampleCount = uint64_t
 
- Protected Attributes inherited from StatefulEffectBase::Instance
StatefulEffectBasemEffect
 
- Protected Attributes inherited from PerTrackEffect::Instance
const PerTrackEffectmProcessor
 

Detailed Description

Implemented with call-throughs to the StatefulPerTrackEffect virtual functions

Definition at line 30 of file StatefulPerTrackEffect.h.

Constructor & Destructor Documentation

◆ Instance()

StatefulPerTrackEffect::Instance::Instance ( StatefulPerTrackEffect effect)
inlineexplicit

Definition at line 35 of file StatefulPerTrackEffect.h.

37 , PerTrackEffect::Instance{ effect }
38 {}
Calls through to members of StatefulEffectBase.

◆ ~Instance()

StatefulPerTrackEffect::Instance::~Instance ( )
overridedefault

Member Function Documentation

◆ GetEffect()

StatefulPerTrackEffect & StatefulPerTrackEffect::Instance::GetEffect ( ) const
inlineprotected

Definition at line 48 of file StatefulPerTrackEffect.h.

49 {
50 // Tolerate const_cast in this class while it sun-sets
51 return static_cast<StatefulPerTrackEffect &>(
52 const_cast<PerTrackEffect &>(mProcessor));
53 }
const PerTrackEffect & mProcessor
Base class for many of the effects in Audacity.
Base class for many of the effects in Audacity.

Referenced by ProcessInitialize(), and AmplifyBase::Instance::~Instance().

Here is the caller graph for this function:

◆ ProcessBlock()

size_t StatefulPerTrackEffect::Instance::ProcessBlock ( EffectSettings settings,
const float *const *  inBlock,
float *const *  outBlock,
size_t  blockLen 
)
overridevirtual

Called for destructive effect computation.

Implements EffectInstance.

Definition at line 35 of file StatefulPerTrackEffect.cpp.

37{
38 return GetEffect().ProcessBlock(settings, inBlock, outBlock, blockLen);
39}
static Settings & settings()
Definition: TrackInfo.cpp:51
StatefulPerTrackEffect & GetEffect() const
virtual size_t ProcessBlock(EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen)=0
Called for destructive effect computation.

References settings().

Here is the call graph for this function:

◆ ProcessFinalize()

bool StatefulPerTrackEffect::Instance::ProcessFinalize ( )
overridevirtualnoexcept

Called at end of destructive processing, for each (mono/stereo) track Default implementation does nothing, returns true This may be called during stack unwinding:

Reimplemented from PerTrackEffect::Instance.

Definition at line 30 of file StatefulPerTrackEffect.cpp.

31{
32 return GetEffect().ProcessFinalize();
33}
bool ProcessFinalize() noexcept override

◆ ProcessInitialize()

bool StatefulPerTrackEffect::Instance::ProcessInitialize ( EffectSettings settings,
double  sampleRate,
ChannelNames  chanMap 
)
overridevirtual

Called at start of destructive processing, for each (mono/stereo) track Default implementation does nothing, returns true

Parameters
chanMapnull or array terminated with ChannelNameEOL. Do not retain the pointer
Postcondition
GetAudioInCount() and GetAudioOutCount() are well defined

Reimplemented from PerTrackEffect::Instance.

Definition at line 23 of file StatefulPerTrackEffect.cpp.

25{
26 return GetEffect()
28}
bool ProcessInitialize(EffectSettings &settings, double sampleRate, ChannelNames chanMap=nullptr) override

References GetEffect(), StatefulPerTrackEffect::ProcessInitialize(), anonymous_namespace{ClipSegmentTest.cpp}::sampleRate, and settings().

Here is the call graph for this function:

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