mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
Allow compiling SDL2 drivers using griffin (#16843)
This commit is contained in:
parent
cef6da6a03
commit
abffbb95d4
@ -93,7 +93,7 @@ static void sdl_audio_playback_cb(void *data, Uint8 *stream, int len)
|
||||
memset(stream + write_size, 0, len - write_size);
|
||||
}
|
||||
|
||||
static INLINE int find_num_frames(int rate, int latency)
|
||||
static INLINE int sdl_audio_find_num_frames(int rate, int latency)
|
||||
{
|
||||
int frames = (rate * latency) / 1000;
|
||||
|
||||
@ -137,7 +137,7 @@ static void *sdl_audio_init(const char *device,
|
||||
* carry approximately half of the latency.
|
||||
*
|
||||
* SDL double buffers audio and we do as well. */
|
||||
frames = find_num_frames(rate, latency / 4);
|
||||
frames = sdl_audio_find_num_frames(rate, latency / 4);
|
||||
|
||||
/* First, let's initialize the output device. */
|
||||
spec.freq = rate;
|
||||
|
@ -42,7 +42,7 @@ typedef struct sdl_microphone
|
||||
bool nonblock;
|
||||
} sdl_microphone_t;
|
||||
|
||||
static INLINE int find_num_frames(int rate, int latency)
|
||||
static INLINE int sdl_microphone_find_num_frames(int rate, int latency)
|
||||
{
|
||||
int frames = (rate * latency) / 1000;
|
||||
|
||||
@ -157,7 +157,7 @@ static void *sdl_microphone_open_mic(void *driver_context,
|
||||
* carry approximately half of the latency.
|
||||
*
|
||||
* SDL double buffers audio and we do as well. */
|
||||
frames = find_num_frames(rate, latency / 4);
|
||||
frames = sdl_microphone_find_num_frames(rate, latency / 4);
|
||||
|
||||
desired_spec.freq = rate;
|
||||
desired_spec.format = AUDIO_F32SYS;
|
||||
|
@ -882,6 +882,9 @@ AUDIO
|
||||
|
||||
#if defined(HAVE_SDL2)
|
||||
#include "../audio/drivers/sdl_audio.c"
|
||||
#include "../input/drivers/sdl_input.c"
|
||||
#include "../input/drivers_joypad/sdl_joypad.c"
|
||||
#include "../gfx/drivers_context/sdl_gl_ctx.c"
|
||||
#ifdef HAVE_MICROPHONE
|
||||
#include "../audio/drivers_microphone/sdl_microphone.c"
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user