diff --git a/audio/resampler.c b/audio/resampler.c index 8faa63e041..df5c5821b3 100644 --- a/audio/resampler.c +++ b/audio/resampler.c @@ -22,36 +22,14 @@ #include "../general.h" -static const rarch_resampler_t *backends[] = { - &sinc_resampler, -}; - bool rarch_resampler_realloc(void **re, const rarch_resampler_t **backend, const char *ident, double bw_ratio) { if (*re && *backend) (*backend)->free(*re); - *re = NULL; - *backend = NULL; - - if (ident) - { - for (unsigned i = 0; i < ARRAY_SIZE(backends); i++) - { - if (strcmp(backends[i]->ident, ident) == 0) - { - *backend = backends[i]; - break; - } - } - } - else - *backend = backends[0]; - - if (!*backend) - return false; - + *backend = &sinc_resampler; *re = (*backend)->init(bw_ratio); + if (!*re) { *backend = NULL; diff --git a/audio/resampler.h b/audio/resampler.h index ee4292588a..131f00d544 100644 --- a/audio/resampler.h +++ b/audio/resampler.h @@ -65,9 +65,13 @@ bool rarch_resampler_realloc(void **re, const rarch_resampler_t **backend, const *handle = NULL; \ } while(0) +#ifdef RARCH_CONSOLE +#define rarch_resampler_process(backend, handle, data) resampler_sinc_process(handle, data) +#else #define rarch_resampler_process(backend, handle, data) do { \ (backend)->process(handle, data); \ } while(0) +#endif #endif