Skip to content

Commit

Permalink
linkage issue fixes due to inlined functions (LMMS#3815)
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen authored and tresf committed Oct 11, 2017
1 parent f56185b commit 04ffea4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions plugins/LadspaEffect/swh/hermes_filter_1200.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,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 @@ -86,7 +86,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 @@ -111,7 +111,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 plugins/LadspaEffect/swh/sifter_1210.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static void __attribute__((constructor)) swh_init(); // forward declaration

#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 @@ -44,7 +44,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 plugins/LadspaEffect/swh/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 plugins/LadspaEffect/swh/vocoder_1337.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct bandpasses
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 @@ -65,7 +65,7 @@ const LADSPA_Data decay_table[] =
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 04ffea4

Please sign in to comment.