From 33ac1a2d09eadf0cecc62be7f218fc702ee410ad Mon Sep 17 00:00:00 2001 From: Tyler Glaiel Date: Fri, 5 Jul 2024 13:48:03 -0700 Subject: [PATCH 1/2] Update FAudio_platform_sdl3.c fixed up some SDL 3 renamed symbols --- src/FAudio_platform_sdl3.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/FAudio_platform_sdl3.c b/src/FAudio_platform_sdl3.c index 3dc5b8b86..38521cc21 100644 --- a/src/FAudio_platform_sdl3.c +++ b/src/FAudio_platform_sdl3.c @@ -186,12 +186,12 @@ void FAudio_PlatformInit( if (deviceIndex == 0) { - devID = SDL_AUDIO_DEVICE_DEFAULT_OUTPUT; + devID = SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK; } else { int devcount; - SDL_AudioDeviceID *devs = SDL_GetAudioOutputDevices(&devcount); + SDL_AudioDeviceID *devs = SDL_GetAudioPlaybackDevices(&devcount); /* Bounds checking is done before this function is called */ devID = devs[deviceIndex - 1]; @@ -241,7 +241,7 @@ void FAudio_PlatformQuit(void* platformDevice) uint32_t FAudio_PlatformGetDeviceCount() { int devcount; - SDL_free(SDL_GetAudioOutputDevices(&devcount)); + SDL_free(SDL_GetAudioPlaybackDevices(&devcount)); if (devcount == 0) { return 0; @@ -264,7 +264,7 @@ uint32_t FAudio_PlatformGetDeviceDetails( FAudio_zero(details, sizeof(FAudioDeviceDetails)); - devs = SDL_GetAudioOutputDevices(&devcount); + devs = SDL_GetAudioPlaybackDevices(&devcount); if (index > devcount) { SDL_free(devs); @@ -324,7 +324,7 @@ uint32_t FAudio_PlatformGetDeviceDetails( /* Get the device format from the OS */ if (index == 0) { - if (SDL_GetAudioDeviceFormat(SDL_AUDIO_DEVICE_DEFAULT_OUTPUT, &spec, NULL) < 0) + if (SDL_GetAudioDeviceFormat(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &spec, NULL) < 0) { SDL_zero(spec); } From b7dbbc192b097111db705b0fff504c772eef5240 Mon Sep 17 00:00:00 2001 From: Tyler Glaiel Date: Fri, 12 Jul 2024 20:23:47 -0700 Subject: [PATCH 2/2] Update FAudio_platform_sdl3.c another SDL3 rename --- src/FAudio_platform_sdl3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FAudio_platform_sdl3.c b/src/FAudio_platform_sdl3.c index 38521cc21..1b9e0efe8 100644 --- a/src/FAudio_platform_sdl3.c +++ b/src/FAudio_platform_sdl3.c @@ -487,7 +487,7 @@ uint8_t* FAudio_memptr(FAudioIOStream *io, size_t offset) { SDL_PropertiesID props = SDL_GetIOProperties((SDL_IOStream*) io->data); FAudio_assert(SDL_HasProperty(props, SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER)); - return (uint8_t*) SDL_GetProperty(props, SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER, NULL); + return (uint8_t*) SDL_GetPointerProperty(props, SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER, NULL); } void FAudio_close(FAudioIOStream *io)