11#ifndef __AUDACITY_REALTIMEEFFECTSTATE_H__
12#define __AUDACITY_REALTIMEEFFECTSTATE_H__
17#include <unordered_map>
34 ,
public std::enable_shared_from_this<RealtimeEffectState>
41 const EffectInstanceFactory *(const PluginID &)
70 std::shared_ptr<EffectInstance>
Initialize(
double rate);
72 std::shared_ptr<EffectInstance>
73 AddTrack(
const Track &track,
unsigned chans,
float sampleRate);
76 bool ProcessStart(
bool running);
81 size_t Process(
const Track &track,
83 const float *
const *inbuf,
93 bool IsEnabled() const noexcept;
96 bool IsActive() const noexcept;
99 void SetActive(
bool active);
102 bool Finalize() noexcept;
104 static const
std::
string &XMLTag();
107 void HandleXMLEndTag(const
std::string_view &tag) override;
128 return mpAccessState.load(std::memory_order_relaxed);
132 return mpAccessState.load(std::memory_order_acquire);
177 std::optional<EffectInstance::SampleCount>
mLatency;
187 std::unordered_map<const Track *, std::pair<size_t, double>>
mGroups;
195 size_t mCurrentProcessor{ 0 };
196 bool mInitialized{
false };
Utility ClientData::Site to register hooks into a host class that attach client data.
static PluginID GetID(EffectPlugin &effect)
Generalized interface for discovery of plug-ins for one protocol.
RealtimeEffectStateChange
static Settings & settings()
std::vector< Attribute > AttributesList
Utility to register hooks into a host class that attach client data.
Site & operator=(const Site &other)
Performs effect computation.
Hold values to send to effect output meters.
Global function-valued variable, adding a convenient Call()
An object that sends messages to an open-ended list of subscribed callbacks.
Mediator of two-way inter-thread communication of changes of settings.
const EffectSettings & GetSettings() const
NonInterfering< SettingsAndCounter > mWorkerSettings
NonInterfering< SettingsAndCounter > mMainSettings
Updated immediately by Access::Set in the main thread.
const EffectOutputs * GetOutputs() const
Get locations that a GUI can connect meters to.
std::optional< EffectInstance::SampleCount > mLatency
How many samples must be discarded.
std::unique_ptr< EffectOutputs > mOutputs
AccessState * TestAccessState() const
RealtimeEffectState(const RealtimeEffectState &other)=delete
std::unique_ptr< EffectInstance::Message > mMessage
std::unordered_map< const Track *, std::pair< size_t, double > > mGroups
std::unique_ptr< EffectInstance::Message > mMovedMessage
std::weak_ptr< EffectInstance > mwInstance
Stateful instance made by the plug-in.
std::unique_ptr< EffectOutputs > mMovedOutputs
Abstract base class for an object holding data associated with points on a time axis.
This class is an interface which should be implemented by classes which wish to be able to load and s...
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
FrameStatistics & GetInstance() noexcept
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
Externalized state of a plug-in.
std::unique_ptr< EffectOutputs > pOutputs
void swap(SettingsAndCounter &other)
Workaround for std::make_shared not working on macOs with over-alignment.