Browse Source

Manually change generated code to use t_param type for parameters

master
falkTX 8 years ago
parent
commit
d020e24f8d
13 changed files with 39 additions and 43 deletions
  1. +1
    -2
      plugins/bitcrush/Makefile
  2. +5
    -5
      plugins/bitcrush/gen_exported.cpp
  3. +3
    -3
      plugins/bitcrush/gen_exported.h
  4. +3
    -3
      plugins/common/DistrhoPluginMaxGen.cpp
  5. +1
    -2
      plugins/freeverb/Makefile
  6. +5
    -5
      plugins/freeverb/gen_exported.cpp
  7. +3
    -3
      plugins/freeverb/gen_exported.h
  8. +1
    -2
      plugins/gigaverb/Makefile
  9. +5
    -5
      plugins/gigaverb/gen_exported.cpp
  10. +3
    -3
      plugins/gigaverb/gen_exported.h
  11. +1
    -2
      plugins/pitchshift/Makefile
  12. +5
    -5
      plugins/pitchshift/gen_exported.cpp
  13. +3
    -3
      plugins/pitchshift/gen_exported.h

+ 1
- 2
plugins/bitcrush/Makefile View File

@@ -13,8 +13,7 @@ NAME = MaBitcrush
# Files to build

OBJS_DSP = \
DistrhoPluginMaxGen.cpp.o \
gen_exported.cpp.o
DistrhoPluginMaxGen.cpp.o

# --------------------------------------------------------------
# Do some magic


+ 5
- 5
plugins/bitcrush/gen_exported.cpp View File

@@ -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;


+ 3
- 3
plugins/bitcrush/gen_exported.h View File

@@ -29,9 +29,9 @@ int num_outputs();
int num_params();
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n);
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);

} // gen_exported::

+ 3
- 3
plugins/common/DistrhoPluginMaxGen.cpp View File

@@ -16,7 +16,7 @@
#include "DistrhoPluginMaxGen.hpp"
#include "gen_exported.h"
#include "gen_exported.cpp"
namespace gen = gen_exported;
@@ -57,7 +57,7 @@ void DistrhoPluginMaxGen::initParameter(uint32_t index, Parameter& parameter)
float DistrhoPluginMaxGen::getParameterValue(uint32_t index) const
{
double value = 0.0;
t_param value = 0.0f;
gen::getparameter(fGenState, index, &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)
{
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);
}
// -----------------------------------------------------------------------


+ 1
- 2
plugins/freeverb/Makefile View File

@@ -13,8 +13,7 @@ NAME = MaFreeverb
# Files to build

OBJS_DSP = \
DistrhoPluginMaxGen.cpp.o \
gen_exported.cpp.o
DistrhoPluginMaxGen.cpp.o

# --------------------------------------------------------------
# Do some magic


+ 5
- 5
plugins/freeverb/gen_exported.cpp View File

@@ -279,8 +279,8 @@ typedef struct State {

/// 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_outputs() { return gen_kernel_numouts; }
@@ -307,7 +307,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_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

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_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:

void * create(double sr, long vs) {
void * create(t_param sr, long vs) {
State *self = new State;
self->reset(sr, vs);
ParamInfo *pi;


+ 3
- 3
plugins/freeverb/gen_exported.h View File

@@ -29,9 +29,9 @@ int num_outputs();
int num_params();
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n);
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);

} // gen_exported::

+ 1
- 2
plugins/gigaverb/Makefile View File

@@ -13,8 +13,7 @@ NAME = MaGigaverb
# Files to build

OBJS_DSP = \
DistrhoPluginMaxGen.cpp.o \
gen_exported.cpp.o
DistrhoPluginMaxGen.cpp.o

# --------------------------------------------------------------
# Do some magic


+ 5
- 5
plugins/gigaverb/gen_exported.cpp View File

@@ -332,8 +332,8 @@ typedef struct State {

/// 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_outputs() { return gen_kernel_numouts; }
@@ -360,7 +360,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_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

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_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:

void * create(double sr, long vs) {
void * create(t_param sr, long vs) {
State *self = new State;
self->reset(sr, vs);
ParamInfo *pi;


+ 3
- 3
plugins/gigaverb/gen_exported.h View File

@@ -29,9 +29,9 @@ int num_outputs();
int num_params();
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n);
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);

} // gen_exported::

+ 1
- 2
plugins/pitchshift/Makefile View File

@@ -13,8 +13,7 @@ NAME = MaPitchshift
# Files to build

OBJS_DSP = \
DistrhoPluginMaxGen.cpp.o \
gen_exported.cpp.o
DistrhoPluginMaxGen.cpp.o

# --------------------------------------------------------------
# Do some magic


+ 5
- 5
plugins/pitchshift/gen_exported.cpp View File

@@ -217,8 +217,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; }
@@ -245,7 +245,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_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

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_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:

void * create(double sr, long vs) {
void * create(t_param sr, long vs) {
State *self = new State;
self->reset(sr, vs);
ParamInfo *pi;


+ 3
- 3
plugins/pitchshift/gen_exported.h View File

@@ -29,9 +29,9 @@ int num_outputs();
int num_params();
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n);
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);

} // gen_exported::

Loading…
Cancel
Save