aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Effect/ladspa/ladspahost.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2016-01-03 17:19:05 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2016-01-03 17:19:05 +0000
commit6748b37d51353ea6e82dabfca812e733edc3c0ad (patch)
tree6fcb8ed6f38e72a75a5df38aecea085d44a2e899 /src/plugins/Effect/ladspa/ladspahost.h
parent9f2c01862bd5b9d058d51a366fb656b1992f5ae0 (diff)
downloadqmmp-6748b37d51353ea6e82dabfca812e733edc3c0ad.tar.gz
qmmp-6748b37d51353ea6e82dabfca812e733edc3c0ad.tar.bz2
qmmp-6748b37d51353ea6e82dabfca812e733edc3c0ad.zip
improved ladspa plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@5970 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Effect/ladspa/ladspahost.h')
-rw-r--r--src/plugins/Effect/ladspa/ladspahost.h39
1 files changed, 18 insertions, 21 deletions
diff --git a/src/plugins/Effect/ladspa/ladspahost.h b/src/plugins/Effect/ladspa/ladspahost.h
index df83c8083..06ff6173b 100644
--- a/src/plugins/Effect/ladspa/ladspahost.h
+++ b/src/plugins/Effect/ladspa/ladspahost.h
@@ -40,10 +40,9 @@ class LADSPAPlugin
{
public:
QString name;
- QString fileName;
long id;
long unique_id;
- bool stereo;
+ const LADSPA_Descriptor *desc;
};
class LADSPAControl
@@ -58,21 +57,18 @@ public:
double min;
double max;
double step;
- LADSPA_Data *value;
+ LADSPA_Data value;
int type;
+ int port;
QString name;
};
class LADSPAEffect
{
public:
- void *library;
- QString fileName;
- bool stereo;
- const LADSPA_Descriptor *descriptor;
- LADSPA_Handle handle; /* left or mono */
- LADSPA_Handle handle2; /* right stereo */
- LADSPA_Data knobs[MAX_KNOBS];
+ LADSPAPlugin *plugin;
+ QList<int> in_ports, out_ports;
+ QList <LADSPA_Handle> handles;
QList <LADSPAControl*> controls;
};
@@ -89,26 +85,27 @@ public:
void configure(quint32 freq, int chan);
QList <LADSPAPlugin *> plugins();
QList <LADSPAEffect *> effects();
- LADSPAEffect *addPlugin(LADSPAPlugin * plugin);
- void unload(LADSPAEffect *instance);
+ void load(LADSPAPlugin *plugin);
+ void unload(LADSPAEffect *effect);
+
static LADSPAHost* instance();
private:
- void bootPlugin(LADSPAEffect *instance);
- void findAllPlugins();
- void findPlugins(const QString &path);
- LADSPAEffect *load(const QString &path, long num);
- void portAssign(LADSPAEffect *instance);
- void initialize(LADSPAEffect *instance);
-
+ void loadModules();
+ void findModules(const QString &path);
+ void unloadModules();
+ LADSPAEffect *createEffect(LADSPAPlugin *plugin);
+ LADSPAControl *createControl(const LADSPA_Descriptor *desc, unsigned long port);
+ void activateEffect(LADSPAEffect *e);
+ void deactivateEffect(LADSPAEffect *e);
QList <LADSPAPlugin *> m_plugins;
QList <LADSPAEffect *> m_effects;
- LADSPA_Data m_left[MAX_SAMPLES], m_right[MAX_SAMPLES], m_trash[MAX_SAMPLES];
-
static LADSPAHost *m_instance;
int m_chan;
quint32 m_freq;
+ QList<void *> m_modules;
+ LADSPA_Data m_buf[9][MAX_SAMPLES];
};
#endif