mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
Rename rarch_resampler_* to retro_resampler_*
This commit is contained in:
parent
03adb6fd3a
commit
b89ec1369f
@ -141,7 +141,7 @@ static struct retro_audio_callback audio_callback = {0};
|
||||
|
||||
static retro_dsp_filter_t *audio_driver_dsp = NULL;
|
||||
static struct string_list *audio_driver_devices_list = NULL;
|
||||
static const rarch_resampler_t *audio_driver_resampler = NULL;
|
||||
static const retro_resampler_t *audio_driver_resampler = NULL;
|
||||
static void *audio_driver_resampler_data = NULL;
|
||||
static const audio_driver_t *current_audio = NULL;
|
||||
static void *audio_driver_context_audio_data = NULL;
|
||||
@ -295,7 +295,7 @@ static bool uninit_audio(void)
|
||||
static bool audio_driver_init_resampler(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
return rarch_resampler_realloc(
|
||||
return retro_resampler_realloc(
|
||||
&audio_driver_resampler_data,
|
||||
&audio_driver_resampler,
|
||||
settings->audio.resampler,
|
||||
|
@ -540,7 +540,7 @@ static void resampler_CC_free(void *re_)
|
||||
(void)re_;
|
||||
}
|
||||
|
||||
rarch_resampler_t CC_resampler = {
|
||||
retro_resampler_t CC_resampler = {
|
||||
resampler_CC_init,
|
||||
resampler_CC_process,
|
||||
resampler_CC_free,
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#include <audio/audio_resampler.h>
|
||||
|
||||
static const rarch_resampler_t *resampler_drivers[] = {
|
||||
static const retro_resampler_t *resampler_drivers[] = {
|
||||
&sinc_resampler,
|
||||
#ifdef HAVE_CC_RESAMPLER
|
||||
&CC_resampler,
|
||||
@ -90,7 +90,7 @@ const void *audio_resampler_driver_find_handle(int idx)
|
||||
**/
|
||||
const char *audio_resampler_driver_find_ident(int idx)
|
||||
{
|
||||
const rarch_resampler_t *drv = resampler_drivers[idx];
|
||||
const retro_resampler_t *drv = resampler_drivers[idx];
|
||||
if (!drv)
|
||||
return NULL;
|
||||
return drv->ident;
|
||||
@ -105,7 +105,7 @@ const char *audio_resampler_driver_find_ident(int idx)
|
||||
* Returns: resampler driver if resampler driver was found, otherwise
|
||||
* NULL.
|
||||
**/
|
||||
static const rarch_resampler_t *find_resampler_driver(const char *ident)
|
||||
static const retro_resampler_t *find_resampler_driver(const char *ident)
|
||||
{
|
||||
int i = find_resampler_driver_index(ident);
|
||||
|
||||
@ -126,7 +126,7 @@ static const rarch_resampler_t *find_resampler_driver(const char *ident)
|
||||
* Returns: true (1) if successfully initialized, otherwise false (0).
|
||||
**/
|
||||
static bool resampler_append_plugs(void **re,
|
||||
const rarch_resampler_t **backend,
|
||||
const retro_resampler_t **backend,
|
||||
double bw_ratio)
|
||||
{
|
||||
resampler_simd_mask_t mask = cpu_features_get();
|
||||
@ -139,7 +139,7 @@ static bool resampler_append_plugs(void **re,
|
||||
}
|
||||
|
||||
/**
|
||||
* rarch_resampler_realloc:
|
||||
* retro_resampler_realloc:
|
||||
* @re : Resampler handle
|
||||
* @backend : Resampler backend that is about to be set.
|
||||
* @ident : Identifier name for resampler we want.
|
||||
@ -150,7 +150,7 @@ static bool resampler_append_plugs(void **re,
|
||||
*
|
||||
* Returns: true (1) if successful, otherwise false (0).
|
||||
**/
|
||||
bool rarch_resampler_realloc(void **re, const rarch_resampler_t **backend,
|
||||
bool retro_resampler_realloc(void **re, const retro_resampler_t **backend,
|
||||
const char *ident, double bw_ratio)
|
||||
{
|
||||
if (*re && *backend)
|
||||
|
@ -78,7 +78,7 @@ static void *resampler_nearest_init(const struct resampler_config *config,
|
||||
return re;
|
||||
}
|
||||
|
||||
rarch_resampler_t nearest_resampler = {
|
||||
retro_resampler_t nearest_resampler = {
|
||||
resampler_nearest_init,
|
||||
resampler_nearest_process,
|
||||
resampler_nearest_free,
|
||||
|
@ -46,7 +46,7 @@ static void *resampler_null_init(const struct resampler_config *config,
|
||||
return (void*)0;
|
||||
}
|
||||
|
||||
rarch_resampler_t null_resampler = {
|
||||
retro_resampler_t null_resampler = {
|
||||
resampler_null_init,
|
||||
resampler_null_process,
|
||||
resampler_null_free,
|
||||
|
@ -479,7 +479,7 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rarch_resampler_t sinc_resampler = {
|
||||
retro_resampler_t sinc_resampler = {
|
||||
resampler_sinc_new,
|
||||
resampler_sinc_process,
|
||||
resampler_sinc_free,
|
||||
|
@ -116,7 +116,7 @@ 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
|
||||
typedef struct retro_resampler
|
||||
{
|
||||
resampler_init_t init;
|
||||
resampler_process_t process;
|
||||
@ -131,7 +131,7 @@ typedef struct rarch_resampler
|
||||
/* Computer-friendly short version of ident.
|
||||
* Lower case, no spaces and special characters, etc. */
|
||||
const char *short_ident;
|
||||
} rarch_resampler_t;
|
||||
} retro_resampler_t;
|
||||
|
||||
typedef struct audio_frame_float
|
||||
{
|
||||
@ -139,12 +139,12 @@ typedef struct audio_frame_float
|
||||
float r;
|
||||
} audio_frame_float_t;
|
||||
|
||||
extern rarch_resampler_t sinc_resampler;
|
||||
extern retro_resampler_t sinc_resampler;
|
||||
#ifdef HAVE_CC_RESAMPLER
|
||||
extern rarch_resampler_t CC_resampler;
|
||||
extern retro_resampler_t CC_resampler;
|
||||
#endif
|
||||
extern rarch_resampler_t nearest_resampler;
|
||||
extern rarch_resampler_t null_resampler;
|
||||
extern retro_resampler_t nearest_resampler;
|
||||
extern retro_resampler_t null_resampler;
|
||||
|
||||
/**
|
||||
* audio_resampler_driver_find_handle:
|
||||
@ -165,7 +165,7 @@ const void *audio_resampler_driver_find_handle(int index);
|
||||
const char *audio_resampler_driver_find_ident(int index);
|
||||
|
||||
/**
|
||||
* rarch_resampler_realloc:
|
||||
* retro_resampler_realloc:
|
||||
* @re : Resampler handle
|
||||
* @backend : Resampler backend that is about to be set.
|
||||
* @ident : Identifier name for resampler we want.
|
||||
@ -176,7 +176,7 @@ const char *audio_resampler_driver_find_ident(int index);
|
||||
*
|
||||
* Returns: true (1) if successful, otherwise false (0).
|
||||
**/
|
||||
bool rarch_resampler_realloc(void **re, const rarch_resampler_t **backend,
|
||||
bool retro_resampler_realloc(void **re, const retro_resampler_t **backend,
|
||||
const char *ident, double bw_ratio);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
@ -144,7 +144,7 @@ struct ff_audio_info
|
||||
* Could use libswresample, but it doesn't support floating point ratios.
|
||||
* Use either S16 or (planar) float for simplicity.
|
||||
*/
|
||||
const rarch_resampler_t *resampler;
|
||||
const retro_resampler_t *resampler;
|
||||
void *resampler_data;
|
||||
|
||||
bool use_float;
|
||||
@ -337,7 +337,7 @@ static bool ffmpeg_init_audio(ffmpeg_t *handle)
|
||||
audio->codec->sample_rate = params->sample_rate;
|
||||
audio->codec->time_base = av_d2q(1.0 / params->sample_rate, 1000000);
|
||||
|
||||
rarch_resampler_realloc(&audio->resampler_data,
|
||||
retro_resampler_realloc(&audio->resampler_data,
|
||||
&audio->resampler,
|
||||
settings->audio.resampler,
|
||||
audio->ratio);
|
||||
|
Loading…
x
Reference in New Issue
Block a user