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

#include <Effect.h>

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

Public Member Functions

bool Process (EffectSettings &settings) override
 Actually do the effect here. More...
 
SampleCount GetLatency (const EffectSettings &settings, double sampleRate) const override
 
size_t ProcessBlock (EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen) override
 Default implementation fails (returns 0 always) 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 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...
 

Additional Inherited Members

- Public Types inherited from EffectInstance
using Message = EffectSettingsAccess::Message
 
using SampleCount = uint64_t
 
- Protected Member Functions inherited from StatefulEffectBase::Instance
StatefulEffectBaseGetEffect () const
 
- Protected Attributes inherited from StatefulEffectBase::Instance
StatefulEffectBasemEffect
 

Detailed Description

Definition at line 350 of file Effect.h.

Member Function Documentation

◆ GetLatency()

auto StatefulEffect::Instance::GetLatency ( const EffectSettings settings,
double  sampleRate 
) const
overridevirtual

Default implementation returns 0

Reimplemented from EffectInstance.

Definition at line 53 of file Effect.cpp.

55{
57}
StatefulEffectBase & GetEffect() const
virtual sampleCount GetLatency() const
long long as_long_long() const
Definition: SampleCount.h:48

◆ Process()

bool StatefulEffect::Instance::Process ( EffectSettings settings)
overridevirtual

Actually do the effect here.

Returns
success

Implements EffectInstanceEx.

Definition at line 48 of file Effect.cpp.

49{
50 return GetEffect().Process(*this, settings);
51}
static Settings & settings()
Definition: TrackInfo.cpp:87
virtual bool Process(EffectInstance &instance, EffectSettings &settings)=0

References StatefulEffectBase::Instance::GetEffect(), StatefulEffectBase::Process(), and settings().

Here is the call graph for this function:

◆ ProcessBlock()

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

Default implementation fails (returns 0 always)

Implements EffectInstance.

Definition at line 59 of file Effect.cpp.

61{
62 return 0;
63}

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