Skip to content

Commit

Permalink
Update FAudio_platform_sdl3.c
Browse files Browse the repository at this point in the history
fixed up some SDL 3 renamed symbols
  • Loading branch information
TylerGlaiel authored and flibitijibibo committed Jul 5, 2024
1 parent fc73007 commit 2cc9baa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/FAudio_platform_sdl3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 2cc9baa

Please sign in to comment.