Skip to content

Commit

Permalink
Merge pull request #50 from devnexen/ladspa_linkage_issues
Browse files Browse the repository at this point in the history
inlined functions provoke linkage issues on LMMS.
  • Loading branch information
swh authored Sep 25, 2017
2 parents e73390c + 3bf398c commit 485075e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions hermes_filter_1200.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ typedef struct {
float *op; // pointer to output value
} sv_filter;
inline float soft_clip(float sc_in) {
float soft_clip(float sc_in) {
if ((sc_in < CLIP) && (sc_in > -CLIP)) {
return sc_in;
} else if (sc_in > 0.0f) {
Expand All @@ -66,7 +66,7 @@ inline float soft_clip(float sc_in) {
/* Store data in SVF struct, takes the sampling frequency, cutoff frequency
and Q, and fills in the structure passed */
inline void setup_svf(sv_filter *sv, float fs, float fc, float q, int t) {
void setup_svf(sv_filter *sv, float fs, float fc, float q, int t) {
sv->f = 2.0f * sinf(M_PI * fc / (float)(fs * F_R));
sv->q = 2.0f * cosf(powf(q, 0.1f) * M_PI * 0.5f);
sv->qnrm = sqrtf(sv->q*0.5f + 0.01f);
Expand All @@ -91,7 +91,7 @@ inline void setup_svf(sv_filter *sv, float fs, float fc, float q, int t) {
/* Change the frequency of a running SVF */
inline void setup_f_svf(sv_filter *sv, const float fs, const float fc) {
void setup_f_svf(sv_filter *sv, const float fs, const float fc) {
sv->f = 2.0f * sin(M_PI * fc / ((float)(fs * F_R)));
}
Expand Down
4 changes: 2 additions & 2 deletions sifter_1210.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define MAX_BSIZE 1000
inline int partition(LADSPA_Data array[], int left, int right);
int partition(LADSPA_Data array[], int left, int right);
void q_sort(LADSPA_Data array[], int left, int right) {
float pivot = partition(array, left, right);
Expand All @@ -24,7 +24,7 @@ void q_sort(LADSPA_Data array[], int left, int right) {
}
}
inline int partition(LADSPA_Data array[], int left, int right) {
int partition(LADSPA_Data array[], int left, int right) {
float pivot = array[left];
while (left < right) {
Expand Down
14 changes: 7 additions & 7 deletions util/waveguide_nl.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ waveguide_nl *waveguide_nl_new(int size, float fc, float da, float db)
return wg;
}

inline void waveguide_nl_reset(waveguide_nl *wg)
void waveguide_nl_reset(waveguide_nl *wg)
{
memset(wg->buffer[0], 0, wg->size * sizeof(float));
memset(wg->buffer[1], 0, wg->size * sizeof(float));
Expand All @@ -45,7 +45,7 @@ inline void waveguide_nl_reset(waveguide_nl *wg)
wg->zm1[1] = 0.0f;
}

inline void waveguide_nl_free(waveguide_nl *wg)
void waveguide_nl_free(waveguide_nl *wg)
{
if (!wg) {
return;
Expand All @@ -55,7 +55,7 @@ inline void waveguide_nl_free(waveguide_nl *wg)
free(wg);
}

inline void waveguide_nl_set_delay(waveguide_nl *wg, int delay)
void waveguide_nl_set_delay(waveguide_nl *wg, int delay)
{
if (delay > wg->size) {
wg->delay = wg->size;
Expand All @@ -66,18 +66,18 @@ inline void waveguide_nl_set_delay(waveguide_nl *wg, int delay)
}
}

inline void waveguide_nl_set_fc(waveguide_nl *wg, float fc)
void waveguide_nl_set_fc(waveguide_nl *wg, float fc)
{
wg->fc = fc;
}

inline void waveguide_nl_set_ap(waveguide_nl *wg, float da, float db)
void waveguide_nl_set_ap(waveguide_nl *wg, float da, float db)
{
wg->a1a = (1.0f - da) / (1.0f + da);
wg->a1b = (1.0f - db) / (1.0f + db);
}

inline void waveguide_nl_process_lin(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
void waveguide_nl_process_lin(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
{
float tmp;

Expand All @@ -103,7 +103,7 @@ inline void waveguide_nl_process_lin(waveguide_nl *wg, float in0, float in1, flo
}
}

inline void waveguide_nl_process(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
void waveguide_nl_process(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
{
float tmp;
float a1;
Expand Down
4 changes: 2 additions & 2 deletions vocoder_1337.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
LADSPA_Data y[MAX_BANDS];
};
void inline doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands);
void doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands);
struct bands_out{
LADSPA_Data decay[MAX_BANDS];
Expand All @@ -46,7 +46,7 @@
1/250.0, 1/250.0, 1/250.0
};
void inline doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands)
void doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands)
{
int i;
for (i=0; i < num_bands; i++)
Expand Down

0 comments on commit 485075e

Please sign in to comment.