Audacity 3.2.0
VST3Instance.h
Go to the documentation of this file.
1#pragma once
2
3#include <public.sdk/source/vst/utility/uid.h>
4
5#include "PerTrackEffect.h"
6
7namespace Steinberg
8{
9 class IPlugView;
10 class IPlugFrame;
11}
12
13class NumericTextCtrl;
15
16namespace VST3
17{
18 namespace Hosting
19 {
20 class ClassInfo;
21 class Module;
22 }
23}
24
25class VST3Wrapper;
26class VST3Effect;
27
28class VST3_API VST3Instance
30{
31 std::unique_ptr<VST3Wrapper> mWrapper;
32
33 size_t mUserBlockSize { 8192 };
34 size_t mProcessingBlockSize { 8192 };
35 bool mUseLatency { true };
36 sampleCount mInitialDelay { 0 };
37
38 bool mRecruited{ false };
39 std::vector<std::unique_ptr<VST3Instance>> mProcessors;
40
41public:
42 VST3Instance(const PerTrackEffect& effect, VST3::Hosting::Module& module, const VST3::Hosting::ClassInfo& effectClassInfo);
43 ~VST3Instance() override;
44
45 VST3Instance(const VST3Instance&) = delete;
47
48 size_t GetTailSize() const override;
50 unsigned numChannels, float sampleRate) override;
51 bool RealtimeFinalize(EffectSettings& settings) noexcept override;
53 bool RealtimeProcessStart(MessagePackage& package) override;
54 size_t RealtimeProcess(size_t group, EffectSettings& settings, const float* const* inBuf, float* const* outBuf,
55 size_t numSamples) override;
56 bool RealtimeProcessEnd(EffectSettings& settings) noexcept override;
57 bool RealtimeResume() override;
58 bool RealtimeSuspend() override;
60 const override;
61 bool ProcessFinalize() noexcept override;
62 bool ProcessInitialize(EffectSettings &settings,
63 double sampleRate, ChannelNames chanMap) override;
64 size_t GetBlockSize() const override;
65 size_t SetBlockSize(size_t maxBlockSize) override;
66 size_t ProcessBlock(EffectSettings& settings, const float* const* inBlock, float* const* outBlock,
67 size_t blockLen) override;
68
69 VST3Wrapper& GetWrapper();
70
71 unsigned GetAudioOutCount() const override;
72 unsigned GetAudioInCount() const override;
73
74 void ReloadUserOptions();
75};
ChannelName
static Settings & settings()
Definition: TrackInfo.cpp:51
virtual size_t GetTailSize() const
virtual bool RealtimeAddProcessor(EffectSettings &settings, EffectOutputs *pOutputs, unsigned numChannels, float sampleRate)
virtual bool RealtimeSuspend()
virtual bool RealtimeResume()
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
uint64_t SampleCount
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
Base class for many of the effects in Audacity.
Objects of this class connect Audacity with VST3 effects.
Definition: VST3Effect.h:40
~VST3Instance() override
std::vector< std::unique_ptr< VST3Instance > > mProcessors
Definition: VST3Instance.h:39
VST3Instance(const VST3Instance &)=delete
VST3Instance & operator=(const VST3Instance &)=delete
std::unique_ptr< VST3Wrapper > mWrapper
Definition: VST3Instance.h:31
"Plain" plugin UI, contains a list of parameter controls and values.
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19
Externalized state of a plug-in.