Remove legacy SDL_Audio functions that acts on device id == 1

This commit is contained in:
Sylvain
2023-01-05 09:57:14 +01:00
committed by Ryan C. Gordon
parent bb34441474
commit 2d7f8d7d51
10 changed files with 64 additions and 334 deletions

View File

@@ -1350,7 +1350,8 @@ SDLTest_CommonInit(SDLTest_CommonState *state)
SDL_GetCurrentAudioDriver());
}
if (SDL_OpenAudio(&state->audiospec, NULL) < 0) {
state->audio_id = SDL_OpenAudioDevice(NULL, 0, &state->audiospec, NULL, 0);
if (state->audio_id <= 0) {
SDL_Log("Couldn't open audio: %s\n", SDL_GetError());
return SDL_FALSE;
}