fix some references (it builds!)

This commit is contained in:
Connor Olding 2015-06-08 12:25:44 -07:00
parent 205ec7c035
commit 2bd8ebb62c
3 changed files with 24 additions and 14 deletions

View File

@ -60,3 +60,8 @@ struct Crap_noise
adjust_all(Param *params) adjust_all(Param *params)
{} {}
}; };
constexpr char Crap_noise::label[];
constexpr char Crap_noise::name[];
constexpr char Crap_noise::author[];
constexpr char Crap_noise::copyright[];

View File

@ -121,3 +121,8 @@ struct Crap_tube
wet.desired = params[1].value; wet.desired = params[1].value;
} }
}; };
constexpr char Crap_tube::label[];
constexpr char Crap_tube::name[];
constexpr char Crap_tube::author[];
constexpr char Crap_tube::copyright[];

View File

@ -58,7 +58,7 @@ struct plug_t {
}; };
TEMPLATE TEMPLATE
struct LADSPA_Plugin : public T { struct LADSPA_Plugin {
//static constexpr ulong name_buf_size = (portcount)*PARAM_NAME_LEN; //static constexpr ulong name_buf_size = (portcount)*PARAM_NAME_LEN;
static constexpr ulong portcount = IO_PLUGS + T::parameters; static constexpr ulong portcount = IO_PLUGS + T::parameters;
static Param default_params[T::parameters]; static Param default_params[T::parameters];
@ -176,11 +176,10 @@ TEMPLATE LADSPA_PortDescriptor P::descs[P::portcount];
TEMPLATE LADSPA_PortRangeHint P::hints[P::portcount]; TEMPLATE LADSPA_PortRangeHint P::hints[P::portcount];
TEMPLATE char* P::names[P::portcount]; TEMPLATE char* P::names[P::portcount];
TEMPLATE char P::name_buffer[P::portcount][PARAM_NAME_LEN]; TEMPLATE char P::name_buffer[P::portcount][PARAM_NAME_LEN];
#undef P
TEMPLATE static TEMPLATE static
LADSPA_Descriptor gen_desc() { LADSPA_Descriptor gen_desc() {
T::init(); P::init();
LADSPA_Descriptor d = {}; LADSPA_Descriptor d = {};
d.UniqueID = T::id; d.UniqueID = T::id;
@ -189,25 +188,26 @@ LADSPA_Descriptor gen_desc() {
d.Name = T::name; d.Name = T::name;
d.Maker = T::author; d.Maker = T::author;
d.Copyright = T::copyright; d.Copyright = T::copyright;
d.PortCount = T::portcount; d.PortCount = P::portcount;
d.PortDescriptors = T::descs; d.PortDescriptors = P::descs;
d.PortRangeHints = T::hints; d.PortRangeHints = P::hints;
d.PortNames = (const char *const *) T::names; d.PortNames = (const char *const *) P::names;
d.instantiate = T::plug_construct; d.instantiate = P::plug_construct;
d.cleanup = T::plug_destruct; d.cleanup = P::plug_destruct;
d.activate = T::plug_resume; d.activate = P::plug_resume;
d.deactivate = T::plug_pause; d.deactivate = P::plug_pause;
d.connect_port = T::plug_connect; d.connect_port = P::plug_connect;
d.run = T::plug_process; d.run = P::plug_process;
d.run_adding = NULL; d.run_adding = NULL;
d.set_run_adding_gain = NULL; d.set_run_adding_gain = NULL;
return d; return d;
} }
#undef P
static LADSPA_Descriptor plug_descs[] = { static LADSPA_Descriptor plug_descs[] = {
gen_desc<LADSPA_Plugin<CrapPlug>>() gen_desc<CrapPlug>()
}; };
const LADSPA_Descriptor * const LADSPA_Descriptor *