SDL_Libretro 0.1.0
SDL3-power libretro frontend.
Loading...
Searching...
No Matches
Macros | Functions
SDL_libretro_audio.h File Reference

SDL_libretro - audio subsystem. More...

Go to the source code of this file.

Macros

#define SDL_LIBRETRO_AUDIO_DEFAULT_LATENCY_MS   100
 The threshold of audio latency in milliseconds.
 
#define SDL_LIBRETRO_AUDIO_DEFAULT_SAMPLE_RATE   48000
 Fallback rate used when a core reports no audio sample rate (<= 0).
 
#define SDL_LIBRETRO_AUDIO_DRC_MAX_DELTA   0.005
 The amount to push the DRC to correct audio pitch.
 
#define SDL_LIBRETRO_MIC_DEFAULT_RATE   44100
 The default sample rate for recording microphone input.
 

Functions

unsigned SDL_Libretro_GetAudioLatency (const SDL_Libretro *lr)
 Get the minimum audio latency for the audio stream.
 
double SDL_Libretro_GetSampleRate (const SDL_Libretro *lr)
 Get the audio sample rate the loaded core outputs at.
 
void SDL_Libretro_SetAudioLatency (SDL_Libretro *lr, unsigned latencyMs)
 Set the desired minimum audio latency for the audio stream.
 

Detailed Description

SDL_libretro - audio subsystem.

Pushes libretro's S16 stereo samples directly to SDL3 via SDL_PutAudioStreamData(). SDL handles the format conversion and volume gain.

Definition in file SDL_libretro_audio.h.

Macro Definition Documentation

◆ SDL_LIBRETRO_AUDIO_DEFAULT_LATENCY_MS

#define SDL_LIBRETRO_AUDIO_DEFAULT_LATENCY_MS   100

The threshold of audio latency in milliseconds.

See also
SDL_Libretro_GetAudioLatency()
SDL_Libretro_SetAudioLatency()

Definition at line 20 of file SDL_libretro_audio.h.

◆ SDL_LIBRETRO_AUDIO_DRC_MAX_DELTA

#define SDL_LIBRETRO_AUDIO_DRC_MAX_DELTA   0.005

The amount to push the DRC to correct audio pitch.

The default is good for general use smoothing. Increase when expecting stutter.

See also
SDL_Libretro_UpdateDRC()

Definition at line 38 of file SDL_libretro_audio.h.

◆ SDL_LIBRETRO_MIC_DEFAULT_RATE

#define SDL_LIBRETRO_MIC_DEFAULT_RATE   44100

The default sample rate for recording microphone input.

See also
SDL_Libretro_MicOpen()

Definition at line 404 of file SDL_libretro_audio.h.