31#ifndef ASYNC_AUDIO_LADSPA_PLUGIN_INCLUDED
32#define ASYNC_AUDIO_LADSPA_PLUGIN_INCLUDED
173 : m_path(
path), m_index(index) {}
256 std::string
path(
void)
const {
return m_path; }
272 std::string
label(
void)
const {
return m_desc->Label; }
280 std::string
name(
void)
const {
return m_desc->Name; }
286 std::string
maker(
void)
const {
return m_desc->Maker; }
292 std::string
copyright(
void)
const {
return m_desc->Copyright; }
327 void print(
const std::string& prefix=
"");
352 using InstanceInfoP = std::shared_ptr<InstanceInfo>;
353 using LabelMap = std::map<std::string, InstanceInfoP>;
354 using IDMap = std::map<UniqueID, InstanceInfoP>;
358 static IDMap& idMap(
void)
364 static LabelMap& labelMap(
void)
366 static LabelMap label_map;
370 const LADSPA_Descriptor* ladspaDescriptor(
void);
374 void* m_handle =
nullptr;
376 const LADSPA_Descriptor* m_desc =
nullptr;
377 LADSPA_Handle m_inst_handle =
nullptr;
378 bool m_is_active =
false;
379 LADSPA_Data* m_ctrl_buf =
nullptr;
The base class for an audio processor class.
Use a LADSPA plugin as an audio processor.
AudioLADSPAPlugin & operator=(const AudioLADSPAPlugin &)=delete
Disallow copy assignment.
static bool findPluginsInDir(std::string dir)
Find any LADSPA plugins in the given subdirectory.
std::string name(void) const
Get the name of the plugin.
AudioLADSPAPlugin(const AudioLADSPAPlugin &)=delete
Disallow copy construction.
decltype(LADSPA_Descriptor::PortCount) PortNumber
virtual void processSamples(float *dest, const float *src, int count) override
Process incoming samples and put them into the output buffer.
std::string copyright(void) const
Get the copyright information for the plugin.
~AudioLADSPAPlugin(void)
Destructor.
bool portIsAudio(PortNumber portno) const
Check if a port is an audio port.
static constexpr PortNumber npos
PortNumber portCount(void) const
Get the number of ports for the plugin.
void activate(void)
Activate the plugin.
std::string label(void) const
Get the unique label for the plugin.
PortNumber findControlInputByName(const std::string &name)
Find an input control port by name.
bool portIsInput(PortNumber portno) const
Check if a port is an input port.
UniqueID uniqueId(void) const
Get the unique ID for the plugin.
std::string maker(void) const
Get information on the maker of the plugin.
static bool findPlugins(void)
Find LADSPA plugins in standard subdirectories.
void print(const std::string &prefix="")
Print some useful information for the plugin.
bool portIsControl(PortNumber portno) const
Check if a port is a control port.
AudioLADSPAPlugin(const std::string &path, PluginIndex index)
Constructor.
AudioLADSPAPlugin(UniqueID id)
Constructor.
bool portIsOutput(PortNumber portno) const
Check if a port is an output port.
bool setControl(PortNumber portno, LADSPA_Data val)
Set a control input to the given value.
unsigned long PluginIndex
void deactivate(void)
Deactivate the plugin.
bool initialize(void)
Initialize the plugin.
std::string path(void) const
Get the path to the plugin.
AudioLADSPAPlugin(const std::string &label)
Constructor.
The base class for an audio processor.
Namespace for the asynchronous programming classes.