Update rarch_resampler typedef struct

This commit is contained in:
twinaphex 2014-09-26 16:49:03 +02:00
parent 73de119a84
commit 3e33697dc8
4 changed files with 20 additions and 5 deletions

View File

@ -594,4 +594,5 @@ rarch_resampler_t CC_resampler = {
resampler_CC_free,
RESAMPLER_API_VERSION,
"CC",
"cc"
};

View File

@ -76,4 +76,5 @@ rarch_resampler_t nearest_resampler = {
resampler_nearest_free,
RESAMPLER_API_VERSION,
"nearest",
"nearest"
};

View File

@ -66,13 +66,22 @@ struct resampler_data
double ratio;
};
/* Bandwidth factor. Will be < 1.0 for downsampling, > 1.0 for upsampling.
* Corresponds to expected resampling ratio. */
typedef void *(*resampler_init_t)(double bandwidth_mod,
resampler_simd_mask_t mask);
/* Frees the handle. */
typedef void (*resampler_free_t)(void *data);
/* Processes input data. */
typedef void (*resampler_process_t)(void *_data, struct resampler_data *data);
typedef struct rarch_resampler
{
/* Bandwidth factor. Will be < 1.0 for downsampling, > 1.0 for upsampling.
* Corresponds to expected resampling ratio. */
void *(*init)(double bandwidth_mod, resampler_simd_mask_t mask);
void (*process)(void *re, struct resampler_data *data);
void (*free)(void *re);
resampler_init_t init;
resampler_process_t process;
resampler_free_t free;
/* Must be RESAMPLER_API_VERSION */
unsigned api_version;
@ -80,6 +89,9 @@ typedef struct rarch_resampler
/* Human readable identifier of implementation. */
const char *ident;
/* Computer-friendly short version of ident.
* Lower case, no spaces and special characters, etc. */
const char *short_ident;
} rarch_resampler_t;
typedef struct audio_frame_float

View File

@ -560,5 +560,6 @@ rarch_resampler_t sinc_resampler = {
resampler_sinc_free,
RESAMPLER_API_VERSION,
"sinc",
"sinc"
};