Audacity 3.2.0
|
#include <VST3Instance.h>
Public Member Functions | |
VST3Instance (const PerTrackEffect &effect, VST3::Hosting::Module &module, const VST3::Hosting::ClassInfo &effectClassInfo) | |
~VST3Instance () override | |
VST3Instance (const VST3Instance &)=delete | |
VST3Instance & | operator= (const VST3Instance &)=delete |
size_t | GetTailSize () const override |
bool | RealtimeAddProcessor (EffectSettings &settings, EffectOutputs *pOutputs, unsigned numChannels, float sampleRate) override |
bool | RealtimeFinalize (EffectSettings &settings) noexcept override |
bool | RealtimeInitialize (EffectSettings &settings, double sampleRate) 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 | RealtimeResume () override |
bool | RealtimeSuspend () override |
SampleCount | GetLatency (const EffectSettings &settings, double sampleRate) const override |
bool | ProcessFinalize () noexcept override |
bool | ProcessInitialize (EffectSettings &settings, double sampleRate, ChannelNames chanMap) override |
size_t | GetBlockSize () const override |
size_t | SetBlockSize (size_t maxBlockSize) override |
size_t | ProcessBlock (EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen) override |
Called for destructive effect computation. More... | |
VST3Wrapper & | GetWrapper () |
unsigned | GetAudioOutCount () const override |
How many output buffers to allocate at once. More... | |
unsigned | GetAudioInCount () const override |
How many input buffers to allocate at once. More... | |
void | ReloadUserOptions () |
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 |
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< Message > | MakeMessage () 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... | |
Private Attributes | |
std::unique_ptr< VST3Wrapper > | mWrapper |
size_t | mUserBlockSize { 8192 } |
size_t | mProcessingBlockSize { 8192 } |
bool | mUseLatency { true } |
sampleCount | mInitialDelay { 0 } |
bool | mRecruited { false } |
std::vector< std::unique_ptr< VST3Instance > > | mProcessors |
Additional Inherited Members | |
Public Types inherited from EffectInstance | |
using | Message = EffectSettingsAccess::Message |
using | SampleCount = uint64_t |
Protected Attributes inherited from PerTrackEffect::Instance | |
const PerTrackEffect & | mProcessor |
Definition at line 28 of file VST3Instance.h.
VST3Instance::VST3Instance | ( | const PerTrackEffect & | effect, |
VST3::Hosting::Module & | module, | ||
const VST3::Hosting::ClassInfo & | effectClassInfo | ||
) |
Definition at line 35 of file VST3Instance.cpp.
References mWrapper, and ReloadUserOptions().
|
overridedefault |
|
delete |
|
overridevirtual |
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
Implements EffectInstance.
Definition at line 183 of file VST3Instance.cpp.
References anonymous_namespace{VST3Instance.cpp}::CountChannels(), and mWrapper.
|
overridevirtual |
How many output buffers to allocate at once.
The result is not necessarily well defined before RealtimeInitialize
Implements EffectInstance.
Definition at line 194 of file VST3Instance.cpp.
References anonymous_namespace{VST3Instance.cpp}::CountChannels(), and mWrapper.
|
overridevirtual |
Implements EffectInstance.
Definition at line 160 of file VST3Instance.cpp.
References mProcessingBlockSize.
|
overridevirtual |
Default implementation returns 0
Reimplemented from EffectInstance.
Definition at line 133 of file VST3Instance.cpp.
|
overridevirtual |
Function that has not yet found a use Correct definitions of it will likely depend on settings and state
Reimplemented from EffectInstance.
Definition at line 45 of file VST3Instance.cpp.
VST3Wrapper & VST3Instance::GetWrapper | ( | ) |
Definition at line 178 of file VST3Instance.cpp.
References mWrapper.
|
delete |
|
overridevirtual |
Called for destructive effect computation.
Implements EffectInstance.
Definition at line 172 of file VST3Instance.cpp.
References mWrapper.
|
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 141 of file VST3Instance.cpp.
References mWrapper.
|
overridevirtual |
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 from PerTrackEffect::Instance.
Definition at line 150 of file VST3Instance.cpp.
References mInitialDelay, mProcessingBlockSize, mWrapper, anonymous_namespace{ClipSegmentTest.cpp}::sampleRate, and settings().
|
overridevirtual |
Reimplemented from EffectInstance.
Definition at line 50 of file VST3Instance.cpp.
References PerTrackEffect::Instance::mProcessor, mProcessors, mRecruited, mWrapper, anonymous_namespace{ClipSegmentTest.cpp}::sampleRate, and settings().
|
overridevirtualnoexcept |
Reimplemented from EffectInstance.
Definition at line 68 of file VST3Instance.cpp.
References settings().
|
overridevirtual |
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.
Reimplemented from EffectInstance.
Definition at line 80 of file VST3Instance.cpp.
References mInitialDelay, mProcessingBlockSize, mWrapper, anonymous_namespace{ClipSegmentTest.cpp}::sampleRate, and settings().
|
overridevirtual |
Reimplemented from EffectInstance.
Definition at line 90 of file VST3Instance.cpp.
References mProcessors, mRecruited, and mWrapper.
|
overridevirtualnoexcept |
settings can be updated to let a dialog change appearance at idle
Reimplemented from EffectInstance.
Definition at line 103 of file VST3Instance.cpp.
|
overridevirtual |
settings are possibly changed, since last call, by an asynchronous dialog
Reimplemented from EffectInstance.
Definition at line 108 of file VST3Instance.cpp.
References mProcessors, mWrapper, EffectInstance::MessagePackage::settings, and settings().
|
overridevirtual |
Reimplemented from EffectInstance.
Definition at line 117 of file VST3Instance.cpp.
References mProcessors, and mWrapper.
|
overridevirtual |
Reimplemented from EffectInstance.
Definition at line 125 of file VST3Instance.cpp.
References mProcessors, and mWrapper.
void VST3Instance::ReloadUserOptions | ( | ) |
Definition at line 205 of file VST3Instance.cpp.
References PluginSettings::GetConfig(), PerTrackEffect::Instance::mProcessor, mUseLatency, mUserBlockSize, SetBlockSize(), PluginSettings::Shared, and wxT().
Referenced by VST3Instance().
|
overridevirtual |
Implements EffectInstance.
Definition at line 165 of file VST3Instance.cpp.
References anonymous_namespace{StaffPadTimeAndPitch.cpp}::maxBlockSize, min(), mProcessingBlockSize, and mUserBlockSize.
Referenced by ReloadUserOptions().
|
private |
Definition at line 36 of file VST3Instance.h.
Referenced by ProcessInitialize(), and RealtimeInitialize().
|
private |
Definition at line 34 of file VST3Instance.h.
Referenced by GetBlockSize(), ProcessInitialize(), RealtimeInitialize(), and SetBlockSize().
|
private |
Definition at line 39 of file VST3Instance.h.
Referenced by RealtimeAddProcessor(), RealtimeProcess(), RealtimeProcessStart(), RealtimeResume(), and RealtimeSuspend().
|
private |
Definition at line 38 of file VST3Instance.h.
Referenced by RealtimeAddProcessor(), and RealtimeProcess().
|
private |
Definition at line 35 of file VST3Instance.h.
Referenced by ReloadUserOptions().
|
private |
Definition at line 33 of file VST3Instance.h.
Referenced by ReloadUserOptions(), and SetBlockSize().
|
private |
Definition at line 31 of file VST3Instance.h.
Referenced by GetAudioInCount(), GetAudioOutCount(), GetWrapper(), ProcessBlock(), ProcessFinalize(), ProcessInitialize(), RealtimeAddProcessor(), RealtimeInitialize(), RealtimeProcess(), RealtimeProcessStart(), RealtimeResume(), RealtimeSuspend(), and VST3Instance().