|
|
@@ -91,8 +91,8 @@ typedef struct State { |
|
|
|
|
|
|
|
/// 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_outputs() { return gen_kernel_numouts; } |
|
|
@@ -119,7 +119,7 @@ void reset(CommonState *cself) { |
|
|
|
|
|
|
|
/// 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; |
|
|
|
switch (index) { |
|
|
|
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 |
|
|
|
|
|
|
|
void getparameter(CommonState *cself, long index, double *value) { |
|
|
|
void getparameter(CommonState *cself, long index, t_param *value) { |
|
|
|
State *self = (State *)cself; |
|
|
|
switch (index) { |
|
|
|
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: |
|
|
|
|
|
|
|
void * create(double sr, long vs) { |
|
|
|
void * create(t_param sr, long vs) { |
|
|
|
State *self = new State; |
|
|
|
self->reset(sr, vs); |
|
|
|
ParamInfo *pi; |
|
|
|