15#ifndef __AUDACITY_LV2_INSTANCE__
16#define __AUDACITY_LV2_INSTANCE__
34 bool IsOk()
const {
return mFeatures.mOk; }
41 const float *
const *inBlock,
float *
const *outBlock,
size_t blockLen)
65 unsigned numChannels,
float sampleRate)
override;
71 const float *
const *inbuf,
float *
const *outbuf,
size_t numSamples)
84 std::vector<std::unique_ptr<LV2Wrapper>>
mSlaves;
86 LV2_Atom_Forge mForge{};
89 float mPositionSpeed{ 1.0f };
90 int64_t mPositionFrame{ 0 };
92 size_t mUserBlockSize{};
95 bool mRolling{
true };
96 bool mUseLatency{
false };
static Settings & settings()
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 size_t GetBlockSize() const =0
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.
std::vector< std::unique_ptr< LV2Wrapper > > mSlaves
Each holds lv2 library state for realtime processing of one track.
LV2InstanceFeaturesList mFeatures
std::unique_ptr< LV2Wrapper > mMaster
Holds lv2 library state for destructive processing.
const LV2PortStates & GetPortStates() const
const LV2Wrapper * GetMaster() const
Manager of a handle to an LV2 plug-in instantiation.
bool ProcessInitialize(EffectSettings &settings, double sampleRate, ChannelNames chanMap) override
Base class for many of the effects in Audacity.
constexpr auto sampleRate
constexpr auto maxBlockSize
Externalized state of a plug-in.