(Resamplers) Add RESAMPLER_API_VERSION

This commit is contained in:
twinaphex 2014-09-26 16:36:36 +02:00
parent 72ea0f5b13
commit 73de119a84
4 changed files with 11 additions and 0 deletions

View File

@ -592,5 +592,6 @@ rarch_resampler_t CC_resampler = {
resampler_CC_init,
resampler_CC_process,
resampler_CC_free,
RESAMPLER_API_VERSION,
"CC",
};

View File

@ -74,5 +74,6 @@ rarch_resampler_t nearest_resampler = {
resampler_nearest_init,
resampler_nearest_process,
resampler_nearest_free,
RESAMPLER_API_VERSION,
"nearest",
};

View File

@ -53,6 +53,8 @@ extern "C" {
*/
typedef unsigned resampler_simd_mask_t;
#define RESAMPLER_API_VERSION 1
struct resampler_data
{
const float *data_in;
@ -71,7 +73,13 @@ typedef struct rarch_resampler
void *(*init)(double bandwidth_mod, resampler_simd_mask_t mask);
void (*process)(void *re, struct resampler_data *data);
void (*free)(void *re);
/* Must be RESAMPLER_API_VERSION */
unsigned api_version;
/* Human readable identifier of implementation. */
const char *ident;
} rarch_resampler_t;
typedef struct audio_frame_float

View File

@ -558,6 +558,7 @@ rarch_resampler_t sinc_resampler = {
resampler_sinc_new,
resampler_sinc_process,
resampler_sinc_free,
RESAMPLER_API_VERSION,
"sinc",
};