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>
77 bool ProcessStart(
bool running);
84 const float *
const *inbuf,
94 bool IsEnabled() const noexcept;
97 bool IsActive() const noexcept;
100 void SetActive(
bool active);
103 bool Finalize() noexcept;
105 static const
std::
string &XMLTag();
108 void HandleXMLEndTag(const
std::string_view &tag) override;
129 return mpAccessState.load(std::memory_order_relaxed);
133 return mpAccessState.load(std::memory_order_acquire);
178 std::optional<EffectInstance::SampleCount>
mLatency;
188 std::unordered_map<const ChannelGroup *, std::pair<size_t, double>>
197 size_t mCurrentProcessor{ 0 };
198 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::unordered_map< const ChannelGroup *, std::pair< size_t, double > > mGroups
std::unique_ptr< EffectOutputs > mOutputs
AccessState * TestAccessState() const
RealtimeEffectState(const RealtimeEffectState &other)=delete
std::unique_ptr< EffectInstance::Message > mMessage
std::unique_ptr< EffectInstance::Message > mMovedMessage
std::weak_ptr< EffectInstance > mwInstance
Stateful instance made by the plug-in.
std::unique_ptr< EffectOutputs > mMovedOutputs
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...
constexpr auto sampleRate
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.