audio: Readd SDL_AudioSpec, but just with format/channels/freq fields.

This commit is contained in:
Ryan C. Gordon 2023-05-30 01:08:22 -04:00
parent e6aaed7d79
commit 26525f5fd3
No known key found for this signature in database
GPG key ID: FA148B892AB48044
12 changed files with 244 additions and 287 deletions

View file

@ -1443,7 +1443,8 @@ SDL_bool SDLTest_CommonInit(SDLTest_CommonState *state)
SDL_GetCurrentAudioDriver());
}
state->audio_id = SDL_OpenAudioDevice(0, state->audio_format, state->audio_channels, state->audio_freq);
const SDL_AudioSpec spec = { state->audio_format, state->audio_channels, state->audio_freq };
state->audio_id = SDL_OpenAudioDevice(0, &spec);
if (!state->audio_id) {
SDL_Log("Couldn't open audio: %s\n", SDL_GetError());
return SDL_FALSE;