RetroArch
Functions | Variables
audio_resampler.c File Reference
#include <string.h>
#include <string/stdstring.h>
#include <features/features_cpu.h>
#include <file/config_file_userdata.h>
#include <audio/audio_resampler.h>
Include dependency graph for audio_resampler.c:
This graph shows which files directly or indirectly include this file:

Functions

static int find_resampler_driver_index (const char *ident)
 
const voidaudio_resampler_driver_find_handle (int idx)
 
const char * audio_resampler_driver_find_ident (int idx)
 
static const retro_resampler_tfind_resampler_driver (const char *ident)
 
static bool resampler_append_plugs (void **re, const retro_resampler_t **backend, enum resampler_quality quality, double bw_ratio)
 
bool retro_resampler_realloc (void **re, const retro_resampler_t **backend, const char *ident, enum resampler_quality quality, double bw_ratio)
 

Variables

static const retro_resampler_tresampler_drivers []
 
static const struct resampler_config resampler_config
 

Function Documentation

◆ audio_resampler_driver_find_handle()

const void* audio_resampler_driver_find_handle ( int  idx)

audio_resampler_driver_find_handle: : index of driver to get handle to.

Returns: handle to audio resampler driver at index. Can be NULL if nothing found.

Here is the caller graph for this function:

◆ audio_resampler_driver_find_ident()

const char* audio_resampler_driver_find_ident ( int  idx)

audio_resampler_driver_find_ident: : index of driver to get handle to.

Returns: Human-readable identifier of audio resampler driver at index. Can be NULL if nothing found.

Here is the caller graph for this function:

◆ find_resampler_driver()

static const retro_resampler_t* find_resampler_driver ( const char *  ident)
static

find_resampler_driver: : Identifier of resampler driver to find.

Finds resampler by name.

Returns: resampler driver if resampler driver was found, otherwise NULL.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_resampler_driver_index()

static int find_resampler_driver_index ( const char *  ident)
static

find_resampler_driver_index: : Identifier of resampler driver to find.

Finds resampler driver index by name.

Returns: resampler driver index if resampler driver was found, otherwise -1.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resampler_append_plugs()

static bool resampler_append_plugs ( void **  re,
const retro_resampler_t **  backend,
enum resampler_quality  quality,
double  bw_ratio 
)
static

resampler_append_plugs: : Resampler handle : Resampler backend that is about to be set. : Bandwidth ratio.

Initializes resampler driver based on queried CPU features.

Returns: true (1) if successfully initialized, otherwise false (0).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ retro_resampler_realloc()

bool retro_resampler_realloc ( void **  re,
const retro_resampler_t **  backend,
const char *  ident,
enum resampler_quality  quality,
double  bw_ratio 
)

retro_resampler_realloc: : Resampler handle : Resampler backend that is about to be set. : Identifier name for resampler we want. : Bandwidth ratio.

Reallocates resampler. Will free previous handle before allocating a new one. If ident is NULL, first resampler will be used.

Returns: true (1) if successful, otherwise false (0).

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ resampler_config

Initial value:
= {
}
int config_userdata_get_float(void *userdata, const char *key_str, float *value, float default_value)
Definition: config_file_userdata.c:28
int config_userdata_get_float_array(void *userdata, const char *key_str, float **values, unsigned *out_num_values, const float *default_values, unsigned num_default_values)
Definition: config_file_userdata.c:64
int config_userdata_get_string(void *userdata, const char *key_str, char **output, const char *default_output)
Definition: config_file_userdata.c:125
int config_userdata_get_int_array(void *userdata, const char *key_str, int **values, unsigned *out_num_values, const int *default_values, unsigned num_default_values)
Definition: config_file_userdata.c:95
int config_userdata_get_int(void *userdata, const char *key_str, int *value, int default_value)
Definition: config_file_userdata.c:46
void config_userdata_free(void *ptr)
Definition: config_file_userdata.c:145

◆ resampler_drivers

const retro_resampler_t* resampler_drivers[]
static
Initial value:
= {
}
retro_resampler_t nearest_resampler
Definition: nearest_resampler.c:83
retro_resampler_t sinc_resampler
Definition: sinc_resampler.c:711
#define NULL
Pointer to 0.
Definition: gctypes.h:65
retro_resampler_t null_resampler
Definition: null_resampler.c:51