Audacity 3.2.0
|
#include <StatefulEffectBase.h>
Classes | |
class | Instance |
Calls through to members of StatefulEffectBase. More... | |
Public Types | |
using | MessagePackage = EffectInstance::MessagePackage |
Public Member Functions | |
virtual bool | Init () |
virtual bool | Process (EffectInstance &instance, EffectSettings &settings)=0 |
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 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 | SetBlockSize (size_t maxBlockSize) |
virtual size_t | GetBlockSize () const |
virtual unsigned | GetAudioInCount () const |
How many input buffers to allocate at once. More... | |
virtual unsigned | GetAudioOutCount () const |
How many output buffers to allocate at once. More... | |
virtual sampleCount | GetLatency () const |
virtual bool | NeedsDither () const |
virtual bool | ProcessInitialize (EffectSettings &settings, double sampleRate, ChannelNames chanMap=nullptr) |
virtual bool | ProcessFinalize () noexcept |
Private Attributes | |
size_t | mEffectBlockSize { 0 } |
A mix-in class for effects that are not yet migrated to statelessness. To be eliminated when all effects are migrated
Definition at line 23 of file StatefulEffectBase.h.
Definition at line 101 of file StatefulEffectBase.h.
|
virtual |
How many input buffers to allocate at once.
If the instance processes channels independently, this can return 1 The result is not necessarily well defined before RealtimeInitialize
Default implementation returns 0
Reimplemented in AmplifyBase, Fade, Invert, ScienFilterBase, StereoToMono, and VampEffect.
Definition at line 125 of file StatefulEffectBase.cpp.
|
virtual |
How many output buffers to allocate at once.
The result is not necessarily well defined before RealtimeInitialize
Default implementation returns 0
Reimplemented in AmplifyBase, Fade, Invert, NoiseBase, ScienFilterBase, StereoToMono, and ToneGenBase.
Definition at line 130 of file StatefulEffectBase.cpp.
|
virtual |
Default implementation returns mEffectBlockSize
Reimplemented in StatefulPerTrackEffect.
Definition at line 120 of file StatefulEffectBase.cpp.
References mEffectBlockSize.
|
virtual |
Default implementation returns 0
Definition at line 183 of file StatefulEffectBase.cpp.
|
virtual |
Default implementation does nothing, returns true
Reimplemented in AmplifyBase, AutoDuckBase, ChangeSpeedBase, EqualizationBase, ScienFilterBase, NyquistBase, and VampEffect.
Definition at line 178 of file StatefulEffectBase.cpp.
|
virtual |
Reimplemented in Invert, Repair, RepeatBase, and TruncSilenceBase.
Definition at line 188 of file StatefulEffectBase.cpp.
|
pure virtual |
Implemented in StatefulPerTrackEffect, AutoDuckBase, ChangeSpeedBase, ClickRemovalBase, EqualizationBase, FindClippingBase, Generator, LoudnessBase, NoiseReductionBase, NormalizeBase, PaulstretchBase, Repair, RepeatBase, Reverse, SBSMSBase, StereoToMono, TimeScaleBase, TruncSilenceBase, EffectTwoPassSimpleMono, NyquistBase, and VampEffect.
Referenced by StatefulEffect::Instance::Process().
|
virtualnoexcept |
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 in StatefulPerTrackEffect.
Definition at line 199 of file StatefulEffectBase.cpp.
|
virtual |
Called at start of destructive processing, for each (mono/stereo) track Default implementation does nothing, returns true
chanMap | null or array terminated with ChannelNameEOL. Do not retain the pointer |
GetAudioInCount()
and GetAudioOutCount()
are well defined Reimplemented in Fade, NoiseBase, ScienFilterBase, ToneGenBase, and StatefulPerTrackEffect.
Definition at line 193 of file StatefulEffectBase.cpp.
|
virtual |
Definition at line 140 of file StatefulEffectBase.cpp.
|
virtualnoexcept |
Definition at line 173 of file StatefulEffectBase.cpp.
|
virtual |
GetAudioInCount()
and GetAudioOutCount()
are well definedDefault 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. Default implementation does nothing, returns false
Definition at line 135 of file StatefulEffectBase.cpp.
|
virtual |
Definition at line 161 of file StatefulEffectBase.cpp.
|
virtualnoexcept |
settings can be updated to let a dialog change appearance at idle
Definition at line 168 of file StatefulEffectBase.cpp.
|
virtual |
settings are possibly changed, since last call, by an asynchronous dialog
Definition at line 156 of file StatefulEffectBase.cpp.
|
virtual |
Definition at line 151 of file StatefulEffectBase.cpp.
|
virtual |
Definition at line 146 of file StatefulEffectBase.cpp.
|
virtual |
Default implementation assigns mEffectBlockSize, returns it
Reimplemented in StatefulPerTrackEffect.
Definition at line 114 of file StatefulEffectBase.cpp.
References anonymous_namespace{StaffPadTimeAndPitch.cpp}::maxBlockSize, and mEffectBlockSize.
|
private |
Definition at line 175 of file StatefulEffectBase.h.
Referenced by GetBlockSize(), and SetBlockSize().