From 79f16c267e94eeea3e2046fd60e58c20f309c85f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 28 Apr 2014 05:59:24 +0200 Subject: [PATCH] Add RARCH_INTERNAL ifdefs (for consoles/handhelds later on) --- audio/filters/echo_sse.c | 14 ++++++++++++++ audio/filters/echo_sse.cpp | 13 +++++++++++++ audio/filters/eq.c | 13 +++++++++++++ audio/filters/iir.c | 14 ++++++++++++++ audio/filters/phaser.c | 14 ++++++++++++++ audio/filters/reverb.c | 14 ++++++++++++++ audio/filters/volume.c | 13 +++++++++++++ audio/filters/wah.c | 14 ++++++++++++++ 8 files changed, 109 insertions(+) diff --git a/audio/filters/echo_sse.c b/audio/filters/echo_sse.c index 27b764d4ad..debc3996fd 100644 --- a/audio/filters/echo_sse.c +++ b/audio/filters/echo_sse.c @@ -51,6 +51,13 @@ struct echo_filter_data float input_rate; }; +#ifdef RARCH_INTERNAL +#define rarch_dsp_init echo_sse_dsp_init +#define rarch_dsp_process echo_sse_dsp_process +#define rarch_dsp_free echo_sse_dsp_free +#define rarch_dsp_config echo_sse_dsp_config +#endif + void echo_init(void *data) { unsigned i, j; @@ -203,3 +210,10 @@ RARCH_API_EXPORT const rarch_dsp_plugin_t* RARCH_API_CALLTYPE { return &dsp_plug; } + +#ifdef RARCH_INTERNAL +#undef rarch_dsp_init +#undef rarch_dsp_process +#undef rarch_dsp_free +#undef rarch_dsp_config +#endif diff --git a/audio/filters/echo_sse.cpp b/audio/filters/echo_sse.cpp index 8e80657a27..11bb73a562 100644 --- a/audio/filters/echo_sse.cpp +++ b/audio/filters/echo_sse.cpp @@ -35,6 +35,13 @@ #define ECHO_MS 150 #define AMP 0.0 +#ifdef RARCH_INTERNAL +#define rarch_dsp_init echo_sse_dsp_init +#define rarch_dsp_process echo_sse_dsp_process +#define rarch_dsp_free echo_sse_dsp_free +#define rarch_dsp_config echo_sse_dsp_config +#endif + struct EchoFilter { float echo_buffer[4][0x10000] ALIGNED; @@ -195,3 +202,9 @@ RARCH_API_EXPORT const rarch_dsp_plugin_t* RARCH_API_CALLTYPE return &dsp_plug; } +#ifdef RARCH_INTERNAL +#undef rarch_dsp_init +#undef rarch_dsp_process +#undef rarch_dsp_free +#undef rarch_dsp_config +#endif diff --git a/audio/filters/eq.c b/audio/filters/eq.c index 53fedbda47..14a1cda8e0 100644 --- a/audio/filters/eq.c +++ b/audio/filters/eq.c @@ -38,6 +38,13 @@ #define EQ_FILT_SIZE (EQ_COEFF_SIZE * 2) #endif +#ifdef RARCH_INTERNAL +#define rarch_dsp_init eq_dsp_init +#define rarch_dsp_process eq_dsp_process +#define rarch_dsp_free eq_dsp_free +#define rarch_dsp_config eq_dsp_config +#endif + typedef struct dsp_eq_state dsp_eq_state_t; static complex float phase_lut[2 * EQ_FILT_SIZE + 1]; @@ -411,3 +418,9 @@ RARCH_API_EXPORT const rarch_dsp_plugin_t* RARCH_API_CALLTYPE rarch_dsp_plugin_i return &dsp_plug; } +#ifdef RARCH_INTERNAL +#undef rarch_dsp_init +#undef rarch_dsp_process +#undef rarch_dsp_free +#undef rarch_dsp_config +#endif diff --git a/audio/filters/iir.c b/audio/filters/iir.c index 340273a141..6e20e561e8 100644 --- a/audio/filters/iir.c +++ b/audio/filters/iir.c @@ -33,6 +33,13 @@ #define sqr(a) ((a) * (a)) +#ifdef RARCH_INTERNAL +#define rarch_dsp_init iir_dsp_init +#define rarch_dsp_process iir_dsp_process +#define rarch_dsp_free iir_dsp_free +#define rarch_dsp_config iir_dsp_config +#endif + struct iir_filter { #ifdef __SSE2__ @@ -379,3 +386,10 @@ RARCH_API_EXPORT const rarch_dsp_plugin_t* RARCH_API_CALLTYPE rarch_dsp_plugin_i { return &dsp_plug; } + +#ifdef RARCH_INTERNAL +#undef rarch_dsp_init +#undef rarch_dsp_process +#undef rarch_dsp_free +#undef rarch_dsp_config +#endif diff --git a/audio/filters/phaser.c b/audio/filters/phaser.c index 140a8e0930..f6423e4b87 100644 --- a/audio/filters/phaser.c +++ b/audio/filters/phaser.c @@ -29,6 +29,13 @@ #define PHASERLFOSHAPE 4.0 #define PHASER_LFOSKIPSAMPLES 20 +#ifdef RARCH_INTERNAL +#define rarch_dsp_init phaser_dsp_init +#define rarch_dsp_process phaser_dsp_process +#define rarch_dsp_free phaser_dsp_free +#define rarch_dsp_config phaser_dsp_config +#endif + struct phaser_filter { float freq; @@ -181,3 +188,10 @@ RARCH_API_EXPORT const rarch_dsp_plugin_t* RARCH_API_CALLTYPE rarch_dsp_plugin_i { return &dsp_plug; } + +#ifdef RARCH_INTERNAL +#undef rarch_dsp_init +#undef rarch_dsp_process +#undef rarch_dsp_free +#undef rarch_dsp_config +#endif diff --git a/audio/filters/reverb.c b/audio/filters/reverb.c index 75454ea730..f70fa352f6 100644 --- a/audio/filters/reverb.c +++ b/audio/filters/reverb.c @@ -51,6 +51,13 @@ #define ALLPASSTUNINGL3 341 #define ALLPASSTUNINGL4 225 +#ifdef RARCH_INTERNAL +#define rarch_dsp_init reverb_dsp_init +#define rarch_dsp_process reverb_dsp_process +#define rarch_dsp_free reverb_dsp_free +#define rarch_dsp_config reverb_dsp_config +#endif + struct comb { float feedback; @@ -385,3 +392,10 @@ RARCH_API_EXPORT const rarch_dsp_plugin_t* RARCH_API_CALLTYPE rarch_dsp_plugin_i { return &dsp_plug; } + +#ifdef RARCH_INTERNAL +#undef rarch_dsp_init +#undef rarch_dsp_process +#undef rarch_dsp_free +#undef rarch_dsp_config +#endif diff --git a/audio/filters/volume.c b/audio/filters/volume.c index 91332072c6..7b45a6c756 100644 --- a/audio/filters/volume.c +++ b/audio/filters/volume.c @@ -20,6 +20,13 @@ #include #include +#ifdef RARCH_INTERNAL +#define rarch_dsp_init volume_dsp_init +#define rarch_dsp_process volume_dsp_process +#define rarch_dsp_free volume_dsp_free +#define rarch_dsp_config volume_dsp_config +#endif + struct volume_filter_data { #ifdef __GNUC__ @@ -119,3 +126,9 @@ RARCH_API_EXPORT const rarch_dsp_plugin_t* RARCH_API_CALLTYPE rarch_dsp_plugin_i return &dsp_plug; } +#ifdef RARCH_INTERNAL +#undef rarch_dsp_init +#undef rarch_dsp_process +#undef rarch_dsp_free +#undef rarch_dsp_config +#endif diff --git a/audio/filters/wah.c b/audio/filters/wah.c index e5bb9b27ef..33084da837 100644 --- a/audio/filters/wah.c +++ b/audio/filters/wah.c @@ -30,6 +30,13 @@ #define LFOSKIPSAMPLES 30 #endif +#ifdef RARCH_INTERNAL +#define rarch_dsp_init wah_dsp_init +#define rarch_dsp_process wah_dsp_process +#define rarch_dsp_free wah_dsp_free +#define rarch_dsp_config wah_dsp_config +#endif + struct wahwah_filter { float phase; @@ -174,3 +181,10 @@ RARCH_API_EXPORT const rarch_dsp_plugin_t* RARCH_API_CALLTYPE rarch_dsp_plugin_i { return &dsp_plug; } + +#ifdef RARCH_INTERNAL +#undef rarch_dsp_init +#undef rarch_dsp_process +#undef rarch_dsp_free +#undef rarch_dsp_config +#endif