[SCM] calf/master: + DSSI: allow plugins to customize configure() callback handling
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:37:26 UTC 2013
The following commit has been merged in the master branch:
commit 26201e6b2fce6498c86b19fd86f503bfca865f0b
Author: kfoltman <kfoltman at 78b06b96-2940-0410-b7fc-879d825d01d8>
Date: Thu Jul 31 21:28:54 2008 +0000
+ DSSI: allow plugins to customize configure() callback handling
git-svn-id: https://calf.svn.sourceforge.net/svnroot/calf/trunk@244 78b06b96-2940-0410-b7fc-879d825d01d8
diff --git a/src/calf/giface.h b/src/calf/giface.h
index 4a0905a..f06a369 100644
--- a/src/calf/giface.h
+++ b/src/calf/giface.h
@@ -145,6 +145,7 @@ struct plugin_ctl_iface
virtual float get_level(unsigned int port)=0;
virtual ~plugin_ctl_iface() {}
virtual plugin_command_info *get_commands() { return NULL; }
+ virtual char *configure(const char *key, const char *value) { return NULL; }
virtual void execute(int cmd_no)=0;
};
@@ -237,6 +238,18 @@ struct ladspa_instance: public Module, public plugin_ctl_iface
{
return Module::get_label();
}
+ virtual char *configure(const char *key, const char *value)
+ {
+ if (!strcmp(key, "ExecCommand"))
+ {
+ if (*value)
+ {
+ execute(atoi(value));
+ }
+ return NULL;
+ }
+ return Module::configure(key, value);
+ }
virtual int get_input_count() { return Module::in_count; }
virtual int get_output_count() { return Module::out_count; }
virtual bool get_midi() { return Module::support_midi; }
@@ -498,14 +511,7 @@ struct ladspa_wrapper
const char *Value)
{
instance *const mod = (instance *)Instance;
- if (!strcmp(Key, "ExecCommand"))
- {
- if (*Value)
- {
- mod->execute(atoi(Value));
- }
- }
- return NULL;
+ return mod->configure(Key, Value);
}
static void process_dssi_event(Module *module, snd_seq_event_t &event)
diff --git a/src/calf/modules.h b/src/calf/modules.h
index 99d0e98..044ec3f 100644
--- a/src/calf/modules.h
+++ b/src/calf/modules.h
@@ -55,6 +55,7 @@ public:
/// does parameter change cause an audible click?
static bool is_noisy(int param_no) { return false; }
inline void execute(int cmd_no) {}
+ inline char *configure(const char *key, const char *value) { return NULL; }
};
class amp_audio_module: public null_audio_module
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list