RetroArch
Classes | Macros | Typedefs | Enumerations | Functions | Variables
audio_resampler.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <boolean.h>
#include <retro_common_api.h>
Include dependency graph for audio_resampler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  resampler_data
 
struct  resampler_config
 
struct  retro_resampler
 
struct  audio_frame_float
 

Macros

#define RESAMPLER_SIMD_SSE   (1 << 0)
 
#define RESAMPLER_SIMD_SSE2   (1 << 1)
 
#define RESAMPLER_SIMD_VMX   (1 << 2)
 
#define RESAMPLER_SIMD_VMX128   (1 << 3)
 
#define RESAMPLER_SIMD_AVX   (1 << 4)
 
#define RESAMPLER_SIMD_NEON   (1 << 5)
 
#define RESAMPLER_SIMD_SSE3   (1 << 6)
 
#define RESAMPLER_SIMD_SSSE3   (1 << 7)
 
#define RESAMPLER_SIMD_MMX   (1 << 8)
 
#define RESAMPLER_SIMD_MMXEXT   (1 << 9)
 
#define RESAMPLER_SIMD_SSE4   (1 << 10)
 
#define RESAMPLER_SIMD_SSE42   (1 << 11)
 
#define RESAMPLER_SIMD_AVX2   (1 << 12)
 
#define RESAMPLER_SIMD_VFPU   (1 << 13)
 
#define RESAMPLER_SIMD_PS   (1 << 14)
 
#define RESAMPLER_API_VERSION   1
 

Typedefs

typedef unsigned resampler_simd_mask_t
 
typedef int(* resampler_config_get_float_t) (void *userdata, const char *key, float *value, float default_value)
 
typedef int(* resampler_config_get_int_t) (void *userdata, const char *key, int *value, int default_value)
 
typedef int(* resampler_config_get_float_array_t) (void *userdata, const char *key, float **values, unsigned *out_num_values, const float *default_values, unsigned num_default_values)
 
typedef int(* resampler_config_get_int_array_t) (void *userdata, const char *key, int **values, unsigned *out_num_values, const int *default_values, unsigned num_default_values)
 
typedef int(* resampler_config_get_string_t) (void *userdata, const char *key, char **output, const char *default_output)
 
typedef void(* resampler_config_free_t) (void *ptr)
 
typedef void *(* resampler_init_t) (const struct resampler_config *config, double bandwidth_mod, enum resampler_quality quality, resampler_simd_mask_t mask)
 
typedef void(* resampler_free_t) (void *data)
 
typedef void(* resampler_process_t) (void *_data, struct resampler_data *data)
 
typedef struct retro_resampler retro_resampler_t
 
typedef struct audio_frame_float audio_frame_float_t
 

Enumerations

enum  resampler_quality {
  RESAMPLER_QUALITY_DONTCARE = 0, RESAMPLER_QUALITY_LOWEST, RESAMPLER_QUALITY_LOWER, RESAMPLER_QUALITY_NORMAL,
  RESAMPLER_QUALITY_HIGHER, RESAMPLER_QUALITY_HIGHEST
}
 

Functions

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

Variables

retro_resampler_t sinc_resampler
 
retro_resampler_t nearest_resampler
 
retro_resampler_t null_resampler
 

Macro Definition Documentation

◆ RESAMPLER_API_VERSION

#define RESAMPLER_API_VERSION   1

◆ RESAMPLER_SIMD_AVX

#define RESAMPLER_SIMD_AVX   (1 << 4)

◆ RESAMPLER_SIMD_AVX2

#define RESAMPLER_SIMD_AVX2   (1 << 12)

◆ RESAMPLER_SIMD_MMX

#define RESAMPLER_SIMD_MMX   (1 << 8)

◆ RESAMPLER_SIMD_MMXEXT

#define RESAMPLER_SIMD_MMXEXT   (1 << 9)

◆ RESAMPLER_SIMD_NEON

#define RESAMPLER_SIMD_NEON   (1 << 5)

◆ RESAMPLER_SIMD_PS

#define RESAMPLER_SIMD_PS   (1 << 14)

◆ RESAMPLER_SIMD_SSE

#define RESAMPLER_SIMD_SSE   (1 << 0)

◆ RESAMPLER_SIMD_SSE2

#define RESAMPLER_SIMD_SSE2   (1 << 1)

◆ RESAMPLER_SIMD_SSE3

#define RESAMPLER_SIMD_SSE3   (1 << 6)

◆ RESAMPLER_SIMD_SSE4

#define RESAMPLER_SIMD_SSE4   (1 << 10)

◆ RESAMPLER_SIMD_SSE42

#define RESAMPLER_SIMD_SSE42   (1 << 11)

◆ RESAMPLER_SIMD_SSSE3

#define RESAMPLER_SIMD_SSSE3   (1 << 7)

◆ RESAMPLER_SIMD_VFPU

#define RESAMPLER_SIMD_VFPU   (1 << 13)

◆ RESAMPLER_SIMD_VMX

#define RESAMPLER_SIMD_VMX   (1 << 2)

◆ RESAMPLER_SIMD_VMX128

#define RESAMPLER_SIMD_VMX128   (1 << 3)

Typedef Documentation

◆ audio_frame_float_t

◆ resampler_config_free_t

typedef void(* resampler_config_free_t) (void *ptr)

◆ resampler_config_get_float_array_t

typedef int(* resampler_config_get_float_array_t) (void *userdata, const char *key, float **values, unsigned *out_num_values, const float *default_values, unsigned num_default_values)

◆ resampler_config_get_float_t

typedef int(* resampler_config_get_float_t) (void *userdata, const char *key, float *value, float default_value)

◆ resampler_config_get_int_array_t

typedef int(* resampler_config_get_int_array_t) (void *userdata, const char *key, int **values, unsigned *out_num_values, const int *default_values, unsigned num_default_values)

◆ resampler_config_get_int_t

typedef int(* resampler_config_get_int_t) (void *userdata, const char *key, int *value, int default_value)

◆ resampler_config_get_string_t

typedef int(* resampler_config_get_string_t) (void *userdata, const char *key, char **output, const char *default_output)

◆ resampler_free_t

typedef void(* resampler_free_t) (void *data)

◆ resampler_init_t

typedef void*(* resampler_init_t) (const struct resampler_config *config, double bandwidth_mod, enum resampler_quality quality, resampler_simd_mask_t mask)

◆ resampler_process_t

typedef void(* resampler_process_t) (void *_data, struct resampler_data *data)

◆ resampler_simd_mask_t

typedef unsigned resampler_simd_mask_t

◆ retro_resampler_t

Enumeration Type Documentation

◆ resampler_quality

Enumerator
RESAMPLER_QUALITY_DONTCARE 
RESAMPLER_QUALITY_LOWEST 
RESAMPLER_QUALITY_LOWER 
RESAMPLER_QUALITY_NORMAL 
RESAMPLER_QUALITY_HIGHER 
RESAMPLER_QUALITY_HIGHEST 

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.

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.

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:

◆ 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

◆ nearest_resampler

retro_resampler_t nearest_resampler

◆ null_resampler

retro_resampler_t null_resampler

◆ sinc_resampler

retro_resampler_t sinc_resampler