13#ifndef __AUDACITY_VST_INSTANCE__
14#define __AUDACITY_VST_INSTANCE__
51 unsigned numChannels,
float sampleRate)
override;
58 const float*
const* inbuf,
float*
const* outbuf,
size_t numSamples)
66 const float*
const* inBlock,
float*
const* outBlock,
size_t blockLen)
override;
84 size_t mBlockSize{ 8192 };
86 std::unique_ptr<Message>
MakeMessage()
const override;
88 std::unique_ptr<Message>
MakeMessage(
int id,
double value)
const;
92 void Automate(
int index,
float value)
override;
101 bool OnePresetWasLoadedWhilePlaying();
103 void DeferChunkApplication();
109 void callProcessReplacing(
110 const float*
const* inputs,
float*
const* outputs,
int sampleframes);
114 bool mHasPower{
false };
116 size_t mUserBlockSize{ mBlockSize };
118 bool mReady{
false };
120 bool mRecruited{
false };
124 std::atomic_bool mPresetLoadedWhilePlaying{
false };
127 std::vector<char> mChunkToSetAtIdleTime{};
129 void ApplyChunk(std::vector<char>& chunk);
131 bool ChunkMustBeAppliedInMainThread()
const;
133 bool mIsMeldaPlugin{
false };
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
static Settings & settings()
std::vector< std::unique_ptr< VSTInstance > > VSTInstanceArray
virtual unsigned GetAudioInCount() const =0
How many input buffers to allocate at once.
virtual bool RealtimeAddProcessor(EffectSettings &settings, EffectOutputs *pOutputs, unsigned numChannels, float sampleRate)
virtual size_t ProcessBlock(EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen)=0
Called for destructive effect computation.
virtual bool RealtimeSuspend()
virtual bool RealtimeResume()
virtual size_t SetBlockSize(size_t maxBlockSize)=0
virtual bool RealtimeInitialize(EffectSettings &settings, double sampleRate)
virtual bool RealtimeProcessEnd(EffectSettings &settings) noexcept
settings can be updated to let a dialog change appearance at idle
virtual bool RealtimeFinalize(EffectSettings &settings) noexcept
virtual SampleCount GetLatency(const EffectSettings &settings, double sampleRate) const
virtual unsigned GetAudioOutCount() const =0
How many output buffers to allocate at once.
virtual std::unique_ptr< Message > MakeMessage() const
Called on the main thread, in which the result may be cloned.
virtual size_t GetBlockSize() const =0
virtual bool UsesMessages() const noexcept
virtual bool RealtimeProcessStart(MessagePackage &package)
settings are possibly changed, since last call, by an asynchronous dialog
virtual size_t RealtimeProcess(size_t group, EffectSettings &settings, const float *const *inBuf, float *const *outBuf, size_t numSamples)
Hold values to send to effect output meters.
bool ProcessFinalize() noexcept override
bool ProcessInitialize(EffectSettings &settings, double sampleRate, ChannelNames chanMap) override
Base class for many of the effects in Audacity.
std::mutex mDeferredChunkMutex
constexpr auto sampleRate
constexpr auto maxBlockSize
Externalized state of a plug-in.
virtual void SizeWindow(int w, int h)
virtual void Automate(int index, float value)
virtual void SetBufferDelay(int samples)