hydrogen 1.2.6
LadspaFX Class Reference

#include <LadspaFX.h>

Inheritance diagram for LadspaFX:
Object< LadspaFX > Base

Public Types

enum  { MONO_FX , STEREO_FX , UNDEFINED }
 

Public Member Functions

 ~LadspaFX ()
 
void activate ()
 
void connectAudioPorts (float *pIn_L, float *pIn_R, float *pOut_L, float *pOut_R)
 
void deactivate ()
 
const QString & getLibraryPath () const
 
const QString & getPluginLabel () const
 
const QString & getPluginName () const
 
int getPluginType () const
 
float getVolume () const
 
bool isEnabled () const
 
void processFX (unsigned nFrames)
 
void setEnabled (bool bEnabled)
 
void setPluginName (const QString &sName)
 
void setVolume (float fVolume)
 
- Public Member Functions inherited from Object< LadspaFX >
 Object ()
 
 Object (const Object< LadspaFX > &other)
 
- Public Member Functions inherited from Base
 Base ()
 
 Base (const Base &other)
 
virtual const char * class_name () const
 
void logBacktrace () const
 Print the current stack at point into the debug log.
 
void Print (bool bShort=true) const
 Prints content of toQString() via DEBUGLOG.
 
virtual QString toQString (const QString &sPrefix="", bool bShort=true) const
 Formatted string version for debugging purposes.
 

Static Public Member Functions

static LadspaFXload (const QString &sLibraryPath, const QString &sPluginLabel, long nSampleRate)
 
- Static Public Member Functions inherited from Base
static const char * _class_name ()
 return the class name
 
static QString base_clock (const QString &sMsg)
 Measures the current time and stores it in __last_clock.
 
static QString base_clock_in (const QString &sMsg)
 
static int bootstrap (Logger *logger, bool count=false)
 must be called before any Object instantiation !
 
static bool count_active ()
 
static int getAliveObjectCount ()
 
static object_map_t getObjectMap ()
 
static Loggerlogger ()
 return the logger instance
 
static int objects_count ()
 
static void printObjectMapDiff (object_map_t map)
 Creates the difference between a snapshot of the object map and its current state and prints it to std::cout.
 
static void set_count (bool flag)
 enable/disable class instances counting
 
static void write_objects_map_to (std::ostream &out, object_map_t *map=nullptr)
 output the full objects map to a given ostream
 
static void write_objects_map_to_cerr ()
 output objects map to stderr
 

Data Fields

std::vector< LadspaControlPort * > inputControlPorts
 
float * m_pBuffer_L
 
float * m_pBuffer_R
 
std::vector< LadspaControlPort * > outputControlPorts
 

Private Member Functions

 LadspaFX (const QString &sLibraryPath, const QString &sPluginLabel)
 

Private Attributes

bool m_bActivated
 
bool m_bEnabled
 
const LADSPA_Descriptor * m_d
 
float m_fVolume
 
LADSPA_Handle m_handle
 
unsigned m_nIAPorts
 input audio port
 
unsigned m_nICPorts
 input control port
 
unsigned m_nOAPorts
 output audio port
 
unsigned m_nOCPorts
 output control port
 
QLibrary * m_pLibrary
 
bool m_pluginType
 
QString m_sLabel
 
QString m_sLibraryPath
 
QString m_sName
 

Additional Inherited Members

- Static Public Attributes inherited from Base
static QString sPrintIndention = " "
 String used to format the debugging string output of some core classes.
 
- Protected Member Functions inherited from Object< LadspaFX >
 ~Object ()
 
- Protected Member Functions inherited from Base
 ~Base ()
 
- Static Protected Member Functions inherited from Base
static void registerClass (const char *name, const atomic_obj_cpt_t *counters)
 
- Static Protected Attributes inherited from Base
static bool __count = false
 should we count class instances
 
static timeval __last_clock = { 0, 0 }
 
static Logger__logger = nullptr
 
static bool bLogColors = true
 

Detailed Description

Definition at line 116 of file LadspaFX.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MONO_FX 
STEREO_FX 
UNDEFINED 

Definition at line 120 of file LadspaFX.h.

Constructor & Destructor Documentation

◆ ~LadspaFX()

~LadspaFX ( )

Definition at line 157 of file LadspaFx.cpp.

◆ LadspaFX()

LadspaFX ( const QString & sLibraryPath,
const QString & sPluginLabel )
private

Definition at line 122 of file LadspaFx.cpp.

Member Function Documentation

◆ activate()

void activate ( )

Definition at line 448 of file LadspaFx.cpp.

◆ connectAudioPorts()

void connectAudioPorts ( float * pIn_L,
float * pIn_R,
float * pOut_L,
float * pOut_R )

Definition at line 399 of file LadspaFx.cpp.

◆ deactivate()

void deactivate ( )

Definition at line 460 of file LadspaFx.cpp.

◆ getLibraryPath()

const QString & getLibraryPath ( ) const
inline

Definition at line 151 of file LadspaFX.h.

◆ getPluginLabel()

const QString & getPluginLabel ( ) const
inline

Definition at line 142 of file LadspaFX.h.

◆ getPluginName()

const QString & getPluginName ( ) const
inline

Definition at line 146 of file LadspaFX.h.

◆ getPluginType()

int getPluginType ( ) const
inline

Definition at line 162 of file LadspaFX.h.

◆ getVolume()

float getVolume ( ) const
inline

Definition at line 166 of file LadspaFX.h.

◆ isEnabled()

bool isEnabled ( ) const
inline

Definition at line 155 of file LadspaFX.h.

◆ load()

LadspaFX * load ( const QString & sLibraryPath,
const QString & sPluginLabel,
long nSampleRate )
static

Definition at line 211 of file LadspaFx.cpp.

◆ processFX()

void processFX ( unsigned nFrames)

Definition at line 439 of file LadspaFx.cpp.

◆ setEnabled()

void setEnabled ( bool bEnabled)

Definition at line 201 of file LadspaFx.cpp.

◆ setPluginName()

void setPluginName ( const QString & sName)

Definition at line 194 of file LadspaFx.cpp.

◆ setVolume()

void setVolume ( float fVolume)

Definition at line 472 of file LadspaFx.cpp.

Field Documentation

◆ inputControlPorts

std::vector<LadspaControlPort*> inputControlPorts

Definition at line 131 of file LadspaFX.h.

◆ m_bActivated

bool m_bActivated
private

Definition at line 175 of file LadspaFX.h.

◆ m_bEnabled

bool m_bEnabled
private

Definition at line 174 of file LadspaFX.h.

◆ m_d

const LADSPA_Descriptor* m_d
private

Definition at line 182 of file LadspaFX.h.

◆ m_fVolume

float m_fVolume
private

Definition at line 184 of file LadspaFX.h.

◆ m_handle

LADSPA_Handle m_handle
private

Definition at line 183 of file LadspaFX.h.

◆ m_nIAPorts

unsigned m_nIAPorts
private

input audio port

Definition at line 188 of file LadspaFX.h.

◆ m_nICPorts

unsigned m_nICPorts
private

input control port

Definition at line 186 of file LadspaFX.h.

◆ m_nOAPorts

unsigned m_nOAPorts
private

output audio port

Definition at line 189 of file LadspaFX.h.

◆ m_nOCPorts

unsigned m_nOCPorts
private

output control port

Definition at line 187 of file LadspaFX.h.

◆ m_pBuffer_L

float* m_pBuffer_L

Definition at line 128 of file LadspaFX.h.

◆ m_pBuffer_R

float* m_pBuffer_R

Definition at line 129 of file LadspaFX.h.

◆ m_pLibrary

QLibrary* m_pLibrary
private

Definition at line 180 of file LadspaFX.h.

◆ m_pluginType

bool m_pluginType
private

Definition at line 173 of file LadspaFX.h.

◆ m_sLabel

QString m_sLabel
private

Definition at line 176 of file LadspaFX.h.

◆ m_sLibraryPath

QString m_sLibraryPath
private

Definition at line 178 of file LadspaFX.h.

◆ m_sName

QString m_sName
private

Definition at line 177 of file LadspaFX.h.

◆ outputControlPorts

std::vector<LadspaControlPort*> outputControlPorts

Definition at line 132 of file LadspaFX.h.