@@ -13,8 +13,7 @@ NAME = MaBitcrush | |||||
# Files to build | # Files to build | ||||
OBJS_DSP = \ | OBJS_DSP = \ | ||||
DistrhoPluginMaxGen.cpp.o \ | |||||
gen_exported.cpp.o | |||||
DistrhoPluginMaxGen.cpp.o | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Do some magic | # Do some magic | ||||
@@ -91,8 +91,8 @@ typedef struct State { | |||||
/// Number of signal inputs and outputs | /// Number of signal inputs and outputs | ||||
int gen_kernel_numins = 1; | |||||
int gen_kernel_numouts = 2; | |||||
const int gen_kernel_numins = 1; | |||||
const int gen_kernel_numouts = 2; | |||||
int num_inputs() { return gen_kernel_numins; } | int num_inputs() { return gen_kernel_numins; } | ||||
int num_outputs() { return gen_kernel_numouts; } | int num_outputs() { return gen_kernel_numouts; } | ||||
@@ -119,7 +119,7 @@ void reset(CommonState *cself) { | |||||
/// Set a parameter of a State object | /// Set a parameter of a State object | ||||
void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
void setparameter(CommonState *cself, long index, t_param value, void *ref) { | |||||
State * self = (State *)cself; | State * self = (State *)cself; | ||||
switch (index) { | switch (index) { | ||||
case 0: self->set_resolution(value); break; | case 0: self->set_resolution(value); break; | ||||
@@ -130,7 +130,7 @@ void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
/// Get the value of a parameter of a State object | /// Get the value of a parameter of a State object | ||||
void getparameter(CommonState *cself, long index, double *value) { | |||||
void getparameter(CommonState *cself, long index, t_param *value) { | |||||
State *self = (State *)cself; | State *self = (State *)cself; | ||||
switch (index) { | switch (index) { | ||||
case 0: *value = self->m_resolution_1; break; | case 0: *value = self->m_resolution_1; break; | ||||
@@ -141,7 +141,7 @@ void getparameter(CommonState *cself, long index, double *value) { | |||||
/// Allocate and configure a new State object and it's internal CommonState: | /// Allocate and configure a new State object and it's internal CommonState: | ||||
void * create(double sr, long vs) { | |||||
void * create(t_param sr, long vs) { | |||||
State *self = new State; | State *self = new State; | ||||
self->reset(sr, vs); | self->reset(sr, vs); | ||||
ParamInfo *pi; | ParamInfo *pi; | ||||
@@ -29,9 +29,9 @@ int num_outputs(); | |||||
int num_params(); | int num_params(); | ||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | ||||
void reset(CommonState *cself); | void reset(CommonState *cself); | ||||
void setparameter(CommonState *cself, long index, double value, void *ref); | |||||
void getparameter(CommonState *cself, long index, double *value); | |||||
void * create(double sr, long vs); | |||||
void setparameter(CommonState *cself, long index, t_param value, void *ref); | |||||
void getparameter(CommonState *cself, long index, t_param *value); | |||||
void * create(t_param sr, long vs); | |||||
void destroy(CommonState *cself); | void destroy(CommonState *cself); | ||||
} // gen_exported:: | } // gen_exported:: |
@@ -16,7 +16,7 @@ | |||||
#include "DistrhoPluginMaxGen.hpp" | #include "DistrhoPluginMaxGen.hpp" | ||||
#include "gen_exported.h" | |||||
#include "gen_exported.cpp" | |||||
namespace gen = gen_exported; | namespace gen = gen_exported; | ||||
@@ -57,7 +57,7 @@ void DistrhoPluginMaxGen::initParameter(uint32_t index, Parameter& parameter) | |||||
float DistrhoPluginMaxGen::getParameterValue(uint32_t index) const | float DistrhoPluginMaxGen::getParameterValue(uint32_t index) const | ||||
{ | { | ||||
double value = 0.0; | |||||
t_param value = 0.0f; | |||||
gen::getparameter(fGenState, index, &value); | gen::getparameter(fGenState, index, &value); | ||||
return value; | return value; | ||||
} | } | ||||
@@ -72,7 +72,7 @@ void DistrhoPluginMaxGen::setParameterValue(uint32_t index, float value) | |||||
void DistrhoPluginMaxGen::run(const float** inputs, float** outputs, uint32_t frames) | void DistrhoPluginMaxGen::run(const float** inputs, float** outputs, uint32_t frames) | ||||
{ | { | ||||
gen::perform(fGenState, (float**)inputs, DISTRHO_PLUGIN_NUM_INPUTS, outputs, DISTRHO_PLUGIN_NUM_OUTPUTS, frames); | |||||
gen::perform(fGenState, (float**)inputs, gen::gen_kernel_numins, outputs, gen::gen_kernel_numouts, frames); | |||||
} | } | ||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
@@ -13,8 +13,7 @@ NAME = MaFreeverb | |||||
# Files to build | # Files to build | ||||
OBJS_DSP = \ | OBJS_DSP = \ | ||||
DistrhoPluginMaxGen.cpp.o \ | |||||
gen_exported.cpp.o | |||||
DistrhoPluginMaxGen.cpp.o | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Do some magic | # Do some magic | ||||
@@ -279,8 +279,8 @@ typedef struct State { | |||||
/// Number of signal inputs and outputs | /// Number of signal inputs and outputs | ||||
int gen_kernel_numins = 1; | |||||
int gen_kernel_numouts = 1; | |||||
const int gen_kernel_numins = 1; | |||||
const int gen_kernel_numouts = 1; | |||||
int num_inputs() { return gen_kernel_numins; } | int num_inputs() { return gen_kernel_numins; } | ||||
int num_outputs() { return gen_kernel_numouts; } | int num_outputs() { return gen_kernel_numouts; } | ||||
@@ -307,7 +307,7 @@ void reset(CommonState *cself) { | |||||
/// Set a parameter of a State object | /// Set a parameter of a State object | ||||
void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
void setparameter(CommonState *cself, long index, t_param value, void *ref) { | |||||
State * self = (State *)cself; | State * self = (State *)cself; | ||||
switch (index) { | switch (index) { | ||||
case 0: self->set_fb2(value); break; | case 0: self->set_fb2(value); break; | ||||
@@ -321,7 +321,7 @@ void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
/// Get the value of a parameter of a State object | /// Get the value of a parameter of a State object | ||||
void getparameter(CommonState *cself, long index, double *value) { | |||||
void getparameter(CommonState *cself, long index, t_param *value) { | |||||
State *self = (State *)cself; | State *self = (State *)cself; | ||||
switch (index) { | switch (index) { | ||||
case 0: *value = self->m_fb_1; break; | case 0: *value = self->m_fb_1; break; | ||||
@@ -335,7 +335,7 @@ void getparameter(CommonState *cself, long index, double *value) { | |||||
/// Allocate and configure a new State object and it's internal CommonState: | /// Allocate and configure a new State object and it's internal CommonState: | ||||
void * create(double sr, long vs) { | |||||
void * create(t_param sr, long vs) { | |||||
State *self = new State; | State *self = new State; | ||||
self->reset(sr, vs); | self->reset(sr, vs); | ||||
ParamInfo *pi; | ParamInfo *pi; | ||||
@@ -29,9 +29,9 @@ int num_outputs(); | |||||
int num_params(); | int num_params(); | ||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | ||||
void reset(CommonState *cself); | void reset(CommonState *cself); | ||||
void setparameter(CommonState *cself, long index, double value, void *ref); | |||||
void getparameter(CommonState *cself, long index, double *value); | |||||
void * create(double sr, long vs); | |||||
void setparameter(CommonState *cself, long index, t_param value, void *ref); | |||||
void getparameter(CommonState *cself, long index, t_param *value); | |||||
void * create(t_param sr, long vs); | |||||
void destroy(CommonState *cself); | void destroy(CommonState *cself); | ||||
} // gen_exported:: | } // gen_exported:: |
@@ -13,8 +13,7 @@ NAME = MaGigaverb | |||||
# Files to build | # Files to build | ||||
OBJS_DSP = \ | OBJS_DSP = \ | ||||
DistrhoPluginMaxGen.cpp.o \ | |||||
gen_exported.cpp.o | |||||
DistrhoPluginMaxGen.cpp.o | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Do some magic | # Do some magic | ||||
@@ -332,8 +332,8 @@ typedef struct State { | |||||
/// Number of signal inputs and outputs | /// Number of signal inputs and outputs | ||||
int gen_kernel_numins = 2; | |||||
int gen_kernel_numouts = 2; | |||||
const int gen_kernel_numins = 2; | |||||
const int gen_kernel_numouts = 2; | |||||
int num_inputs() { return gen_kernel_numins; } | int num_inputs() { return gen_kernel_numins; } | ||||
int num_outputs() { return gen_kernel_numouts; } | int num_outputs() { return gen_kernel_numouts; } | ||||
@@ -360,7 +360,7 @@ void reset(CommonState *cself) { | |||||
/// Set a parameter of a State object | /// Set a parameter of a State object | ||||
void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
void setparameter(CommonState *cself, long index, t_param value, void *ref) { | |||||
State * self = (State *)cself; | State * self = (State *)cself; | ||||
switch (index) { | switch (index) { | ||||
case 0: self->set_damping(value); break; | case 0: self->set_damping(value); break; | ||||
@@ -378,7 +378,7 @@ void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
/// Get the value of a parameter of a State object | /// Get the value of a parameter of a State object | ||||
void getparameter(CommonState *cself, long index, double *value) { | |||||
void getparameter(CommonState *cself, long index, t_param *value) { | |||||
State *self = (State *)cself; | State *self = (State *)cself; | ||||
switch (index) { | switch (index) { | ||||
case 0: *value = self->m_damping_18; break; | case 0: *value = self->m_damping_18; break; | ||||
@@ -396,7 +396,7 @@ void getparameter(CommonState *cself, long index, double *value) { | |||||
/// Allocate and configure a new State object and it's internal CommonState: | /// Allocate and configure a new State object and it's internal CommonState: | ||||
void * create(double sr, long vs) { | |||||
void * create(t_param sr, long vs) { | |||||
State *self = new State; | State *self = new State; | ||||
self->reset(sr, vs); | self->reset(sr, vs); | ||||
ParamInfo *pi; | ParamInfo *pi; | ||||
@@ -29,9 +29,9 @@ int num_outputs(); | |||||
int num_params(); | int num_params(); | ||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | ||||
void reset(CommonState *cself); | void reset(CommonState *cself); | ||||
void setparameter(CommonState *cself, long index, double value, void *ref); | |||||
void getparameter(CommonState *cself, long index, double *value); | |||||
void * create(double sr, long vs); | |||||
void setparameter(CommonState *cself, long index, t_param value, void *ref); | |||||
void getparameter(CommonState *cself, long index, t_param *value); | |||||
void * create(t_param sr, long vs); | |||||
void destroy(CommonState *cself); | void destroy(CommonState *cself); | ||||
} // gen_exported:: | } // gen_exported:: |
@@ -13,8 +13,7 @@ NAME = MaPitchshift | |||||
# Files to build | # Files to build | ||||
OBJS_DSP = \ | OBJS_DSP = \ | ||||
DistrhoPluginMaxGen.cpp.o \ | |||||
gen_exported.cpp.o | |||||
DistrhoPluginMaxGen.cpp.o | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Do some magic | # Do some magic | ||||
@@ -217,8 +217,8 @@ typedef struct State { | |||||
/// Number of signal inputs and outputs | /// Number of signal inputs and outputs | ||||
int gen_kernel_numins = 1; | |||||
int gen_kernel_numouts = 2; | |||||
const int gen_kernel_numins = 1; | |||||
const int gen_kernel_numouts = 2; | |||||
int num_inputs() { return gen_kernel_numins; } | int num_inputs() { return gen_kernel_numins; } | ||||
int num_outputs() { return gen_kernel_numouts; } | int num_outputs() { return gen_kernel_numouts; } | ||||
@@ -245,7 +245,7 @@ void reset(CommonState *cself) { | |||||
/// Set a parameter of a State object | /// Set a parameter of a State object | ||||
void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
void setparameter(CommonState *cself, long index, t_param value, void *ref) { | |||||
State * self = (State *)cself; | State * self = (State *)cself; | ||||
switch (index) { | switch (index) { | ||||
case 0: self->set_blur(value); break; | case 0: self->set_blur(value); break; | ||||
@@ -259,7 +259,7 @@ void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
/// Get the value of a parameter of a State object | /// Get the value of a parameter of a State object | ||||
void getparameter(CommonState *cself, long index, double *value) { | |||||
void getparameter(CommonState *cself, long index, t_param *value) { | |||||
State *self = (State *)cself; | State *self = (State *)cself; | ||||
switch (index) { | switch (index) { | ||||
case 0: *value = self->m_blur_6; break; | case 0: *value = self->m_blur_6; break; | ||||
@@ -273,7 +273,7 @@ void getparameter(CommonState *cself, long index, double *value) { | |||||
/// Allocate and configure a new State object and it's internal CommonState: | /// Allocate and configure a new State object and it's internal CommonState: | ||||
void * create(double sr, long vs) { | |||||
void * create(t_param sr, long vs) { | |||||
State *self = new State; | State *self = new State; | ||||
self->reset(sr, vs); | self->reset(sr, vs); | ||||
ParamInfo *pi; | ParamInfo *pi; | ||||
@@ -29,9 +29,9 @@ int num_outputs(); | |||||
int num_params(); | int num_params(); | ||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | ||||
void reset(CommonState *cself); | void reset(CommonState *cself); | ||||
void setparameter(CommonState *cself, long index, double value, void *ref); | |||||
void getparameter(CommonState *cself, long index, double *value); | |||||
void * create(double sr, long vs); | |||||
void setparameter(CommonState *cself, long index, t_param value, void *ref); | |||||
void getparameter(CommonState *cself, long index, t_param *value); | |||||
void * create(t_param sr, long vs); | |||||
void destroy(CommonState *cself); | void destroy(CommonState *cself); | ||||
} // gen_exported:: | } // gen_exported:: |