From 9d927ef827ec42380a2ee29ce1281786fe806d66 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 28 Apr 2014 05:49:19 +0200 Subject: [PATCH] (DSP Filters) Use the namespace 'rarch_dsp_*' for symbols --- audio/filters/echo_sse.c | 17 ++++++++--------- audio/filters/echo_sse.cpp | 18 +++++++++++------- audio/filters/eq.c | 16 ++++++++-------- audio/filters/iir.c | 16 ++++++++-------- audio/filters/link.T | 2 +- audio/filters/phaser.c | 17 ++++++++--------- audio/filters/reverb.c | 16 ++++++++-------- audio/filters/volume.c | 16 ++++++++-------- audio/filters/wah.c | 16 ++++++++-------- 9 files changed, 68 insertions(+), 66 deletions(-) diff --git a/audio/filters/echo_sse.c b/audio/filters/echo_sse.c index 239fc4a286..27b764d4ad 100644 --- a/audio/filters/echo_sse.c +++ b/audio/filters/echo_sse.c @@ -149,7 +149,7 @@ unsigned echo_sse2_process(void *data, const float *input, unsigned frames) return frames_out; } -static void dsp_process(void *data, rarch_dsp_output_t *output, +static void rarch_dsp_process(void *data, rarch_dsp_output_t *output, const rarch_dsp_input_t *input) { struct echo_filter_data *echo = (struct echo_filter_data*)data; @@ -157,7 +157,7 @@ static void dsp_process(void *data, rarch_dsp_output_t *output, output->frames = echo_sse2_process(echo, input->samples, input->frames); } -static void dsp_free(void *data) +static void rarch_dsp_free(void *data) { struct echo_filter_data *echo = (struct echo_filter_data*)data; @@ -165,7 +165,7 @@ static void dsp_free(void *data) free(echo); } -static void *dsp_init(const rarch_dsp_info_t *info) +static void *rarch_dsp_init(const rarch_dsp_info_t *info) { struct echo_filter_data *echo = (struct echo_filter_data*)calloc(1, sizeof(*echo));; @@ -184,17 +184,17 @@ static void *dsp_init(const rarch_dsp_info_t *info) return echo; } -static void dsp_config(void *data) +static void rarch_dsp_config(void *data) { (void)data; } static const rarch_dsp_plugin_t dsp_plug = { - dsp_init, - dsp_process, - dsp_free, + rarch_dsp_init, + rarch_dsp_process, + rarch_dsp_free, RARCH_DSP_API_VERSION, - dsp_config, + rarch_dsp_config, "Echo (SSE2)" }; @@ -203,4 +203,3 @@ RARCH_API_EXPORT const rarch_dsp_plugin_t* RARCH_API_CALLTYPE { return &dsp_plug; } - diff --git a/audio/filters/echo_sse.cpp b/audio/filters/echo_sse.cpp index d1f0217f74..8e80657a27 100644 --- a/audio/filters/echo_sse.cpp +++ b/audio/filters/echo_sse.cpp @@ -148,7 +148,7 @@ struct EchoFilter } }; -static void dsp_process(void *data, rarch_dsp_output_t *output, +static void rarch_dsp_process(void *data, rarch_dsp_output_t *output, const rarch_dsp_input_t *input) { EchoFilter *echo = reinterpret_cast(data); @@ -157,12 +157,12 @@ static void dsp_process(void *data, rarch_dsp_output_t *output, output->frames = echo->Process(input->samples, input->frames); } -static void dsp_free(void *data) +static void rarch_dsp_free(void *data) { delete reinterpret_cast(data); } -static void *dsp_init(const rarch_dsp_info_t *info) +static void * rarch_dsp_init(const rarch_dsp_info_t *info) { EchoFilter *echo = new EchoFilter; @@ -176,18 +176,22 @@ static void *dsp_init(const rarch_dsp_info_t *info) return echo; } -static void dsp_config(void *) -{} +static void rarch_dsp_config(void *) +{ +} static const rarch_dsp_plugin_t dsp_plug = { dsp_init, dsp_process, dsp_free, RARCH_DSP_API_VERSION, - dsp_config, + rarch_dsp_config, "Echo (SSE2)" }; RARCH_API_EXPORT const rarch_dsp_plugin_t* RARCH_API_CALLTYPE - rarch_dsp_plugin_init(void) { return &dsp_plug; } + rarch_dsp_plugin_init(void) +{ + return &dsp_plug; +} diff --git a/audio/filters/eq.c b/audio/filters/eq.c index 37b35d328c..53fedbda47 100644 --- a/audio/filters/eq.c +++ b/audio/filters/eq.c @@ -356,7 +356,7 @@ static size_t equalizer_process(void *data, const float *in, unsigned frames) return written; } -static void *dsp_init(const rarch_dsp_info_t *info) +static void * rarch_dsp_init(const rarch_dsp_info_t *info) { const float bands[] = { 30, 80, 150, 250, 500, 800, 1000, 2000, 3000, 5000, 8000, 10000, 12000, 15000 }; struct equalizer_filter_data *eq = (struct equalizer_filter_data*)calloc(1, sizeof(*eq)); @@ -370,7 +370,7 @@ static void *dsp_init(const rarch_dsp_info_t *info) return eq; } -static void dsp_process(void *data, rarch_dsp_output_t *output, +static void rarch_dsp_process(void *data, rarch_dsp_output_t *output, const rarch_dsp_input_t *input) { struct equalizer_filter_data *eq = (struct equalizer_filter_data*)data; @@ -380,7 +380,7 @@ static void dsp_process(void *data, rarch_dsp_output_t *output, output->frames = out_frames; } -static void dsp_free(void *data) +static void rarch_dsp_free(void *data) { struct equalizer_filter_data *eq = (struct equalizer_filter_data*)data; @@ -392,17 +392,17 @@ static void dsp_free(void *data) } } -static void dsp_config(void *data) +static void rarch_dsp_config(void *data) { (void)data; } const rarch_dsp_plugin_t dsp_plug = { - dsp_init, - dsp_process, - dsp_free, + rarch_dsp_init, + rarch_dsp_process, + rarch_dsp_free, RARCH_DSP_API_VERSION, - dsp_config, + rarch_dsp_config, "Equalizer" }; diff --git a/audio/filters/iir.c b/audio/filters/iir.c index a64419ec38..340273a141 100644 --- a/audio/filters/iir.c +++ b/audio/filters/iir.c @@ -305,7 +305,7 @@ static float iir_process(void *data, float samp) } #endif -static void* dsp_init(const rarch_dsp_info_t *info) +static void * rarch_dsp_init(const rarch_dsp_info_t *info) { struct iir_filter_data *iir = (struct iir_filter_data*)calloc(1, sizeof(*iir)); @@ -326,7 +326,7 @@ static void* dsp_init(const rarch_dsp_info_t *info) return iir; } -static void dsp_process(void *data, rarch_dsp_output_t *output, +static void rarch_dsp_process(void *data, rarch_dsp_output_t *output, const rarch_dsp_input_t *input) { struct iir_filter_data *iir = (struct iir_filter_data*)data; @@ -349,7 +349,7 @@ static void dsp_process(void *data, rarch_dsp_output_t *output, output->frames = input->frames; } -static void dsp_free(void *data) +static void rarch_dsp_free(void *data) { struct iir_filter_data *iir = (struct iir_filter_data*)data; @@ -357,16 +357,16 @@ static void dsp_free(void *data) free(iir); } -static void dsp_config(void* data) +static void rarch_dsp_config(void* data) { } const rarch_dsp_plugin_t dsp_plug = { - dsp_init, - dsp_process, - dsp_free, + rarch_dsp_init, + rarch_dsp_process, + rarch_dsp_free, RARCH_DSP_API_VERSION, - dsp_config, + rarch_dsp_config, #ifdef __SSE2__ "IIR (SSE2)" #else diff --git a/audio/filters/link.T b/audio/filters/link.T index b17b65af78..ea0000d6f6 100644 --- a/audio/filters/link.T +++ b/audio/filters/link.T @@ -1,4 +1,4 @@ { - global: dsp_*; + global: rarch_dsp_*; local: *; }; diff --git a/audio/filters/phaser.c b/audio/filters/phaser.c index 5e922b584c..140a8e0930 100644 --- a/audio/filters/phaser.c +++ b/audio/filters/phaser.c @@ -93,7 +93,7 @@ static float phaser_process(void *data, float in) return out; } -static void* dsp_init(const rarch_dsp_info_t *info) +static void * rarch_dsp_init(const rarch_dsp_info_t *info) { float freq, startphase, fb; int depth, stages, drywet; @@ -130,7 +130,7 @@ static void* dsp_init(const rarch_dsp_info_t *info) return phaser; } -static void dsp_process(void *data, rarch_dsp_output_t *output, +static void rarch_dsp_process(void *data, rarch_dsp_output_t *output, const rarch_dsp_input_t *input) { int i, num_samples; @@ -148,7 +148,7 @@ static void dsp_process(void *data, rarch_dsp_output_t *output, output->frames = input->frames; } -static void dsp_free(void *data) +static void rarch_dsp_free(void *data) { struct phaser_filter_data *phaser = (struct phaser_filter_data*)data; @@ -163,17 +163,17 @@ static void dsp_free(void *data) } } -static void dsp_config(void *data) +static void rarch_dsp_config(void *data) { (void)data; } const rarch_dsp_plugin_t dsp_plug = { - dsp_init, - dsp_process, - dsp_free, + rarch_dsp_init, + rarch_dsp_process, + rarch_dsp_free, RARCH_DSP_API_VERSION, - dsp_config, + rarch_dsp_config, "Phaser plugin" }; @@ -181,4 +181,3 @@ RARCH_API_EXPORT const rarch_dsp_plugin_t* RARCH_API_CALLTYPE rarch_dsp_plugin_i { return &dsp_plug; } - diff --git a/audio/filters/reverb.c b/audio/filters/reverb.c index 99bd8f9f08..75454ea730 100644 --- a/audio/filters/reverb.c +++ b/audio/filters/reverb.c @@ -312,7 +312,7 @@ struct reverb_filter_data }; -static void* dsp_init(const rarch_dsp_info_t *info) +static void * rarch_dsp_init(const rarch_dsp_info_t *info) { float drytime, wettime, damping, roomwidth, roomsize; (void)info; @@ -341,7 +341,7 @@ static void* dsp_init(const rarch_dsp_info_t *info) return reverb; } -static void dsp_process(void *data, rarch_dsp_output_t *output, +static void rarch_dsp_process(void *data, rarch_dsp_output_t *output, const rarch_dsp_input_t *input) { int i, num_samples; @@ -359,7 +359,7 @@ static void dsp_process(void *data, rarch_dsp_output_t *output, output->frames = input->frames; } -static void dsp_free(void *data) +static void rarch_dsp_free(void *data) { struct reverb_filter_data *rev = (struct reverb_filter_data*)data; @@ -367,17 +367,17 @@ static void dsp_free(void *data) free(rev); } -static void dsp_config(void *data) +static void rarch_dsp_config(void *data) { (void)data; } const rarch_dsp_plugin_t dsp_plug = { - dsp_init, - dsp_process, - dsp_free, + rarch_dsp_init, + rarch_dsp_process, + rarch_dsp_free, RARCH_DSP_API_VERSION, - dsp_config, + rarch_dsp_config, "Reverberatation" }; diff --git a/audio/filters/volume.c b/audio/filters/volume.c index 47522e9dbf..91332072c6 100644 --- a/audio/filters/volume.c +++ b/audio/filters/volume.c @@ -68,7 +68,7 @@ void volume_process(void *data, const float *in, unsigned frames) } } -static void *dsp_init(const rarch_dsp_info_t *info) +static void * rarch_dsp_init(const rarch_dsp_info_t *info) { struct volume_filter_data *vol = (struct volume_filter_data*)calloc(1, sizeof(*vol)); (void)info; @@ -83,7 +83,7 @@ static void *dsp_init(const rarch_dsp_info_t *info) return vol; } -static void dsp_process(void *data, rarch_dsp_output_t *output, +static void rarch_dsp_process(void *data, rarch_dsp_output_t *output, const rarch_dsp_input_t *input) { struct volume_filter_data *vol = (struct volume_filter_data*)data; @@ -93,7 +93,7 @@ static void dsp_process(void *data, rarch_dsp_output_t *output, output->frames = input->frames; } -static void dsp_free(void *data) +static void rarch_dsp_free(void *data) { struct volume_filter_data *vol = (struct volume_filter_data*)data; @@ -101,16 +101,16 @@ static void dsp_free(void *data) free(vol); } -static void dsp_config(void *data) +static void rarch_dsp_config(void *data) { } const rarch_dsp_plugin_t dsp_plug = { - dsp_init, - dsp_process, - dsp_free, + rarch_dsp_init, + rarch_dsp_process, + rarch_dsp_free, RARCH_DSP_API_VERSION, - dsp_config, + rarch_dsp_config, "Volume" }; diff --git a/audio/filters/wah.c b/audio/filters/wah.c index fdd4d30fe9..e5bb9b27ef 100644 --- a/audio/filters/wah.c +++ b/audio/filters/wah.c @@ -100,7 +100,7 @@ static float wahwah_process(void *data, float samp) return samp; } -static void *dsp_init(const rarch_dsp_info_t *info) +static void * rarch_dsp_init(const rarch_dsp_info_t *info) { float freq = 1.5; float startphase = 0.0; @@ -130,7 +130,7 @@ static void *dsp_init(const rarch_dsp_info_t *info) return wah; } -static void dsp_process(void *data, rarch_dsp_output_t *output, +static void rarch_dsp_process(void *data, rarch_dsp_output_t *output, const rarch_dsp_input_t *input) { int num_samples, i; @@ -149,7 +149,7 @@ static void dsp_process(void *data, rarch_dsp_output_t *output, output->frames = input->frames; } -static void dsp_free(void *data) +static void rarch_dsp_free(void *data) { struct wahwah_filter_data *wah = (struct wahwah_filter_data*)data; @@ -157,16 +157,16 @@ static void dsp_free(void *data) free(wah); } -static void dsp_config(void *data) +static void rarch_dsp_config(void *data) { } const rarch_dsp_plugin_t dsp_plug = { - dsp_init, - dsp_process, - dsp_free, + rarch_dsp_init, + rarch_dsp_process, + rarch_dsp_free, RARCH_DSP_API_VERSION, - dsp_config, + rarch_dsp_config, "Wah" };