mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-17 18:28:28 +00:00
audio: Readd SDL_AudioSpec, but just with format/channels/freq fields.
This commit is contained in:
parent
e6aaed7d79
commit
26525f5fd3
12 changed files with 244 additions and 287 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue