mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-01 01:24:34 +00:00
audio: An enormous amount of work on managing default devices.
This commit is contained in:
@@ -86,9 +86,7 @@ close_audio(void)
|
||||
static void
|
||||
open_audio(void)
|
||||
{
|
||||
SDL_AudioDeviceID *devices = SDL_GetAudioOutputDevices(NULL);
|
||||
device = devices ? SDL_OpenAudioDevice(devices[0], &wave.spec) : 0;
|
||||
SDL_free(devices);
|
||||
device = SDL_OpenAudioDevice(SDL_AUDIO_DEVICE_DEFAULT_OUTPUT, &wave.spec);
|
||||
if (!device) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open audio: %s\n", SDL_GetError());
|
||||
SDL_free(wave.sound);
|
||||
|
||||
Reference in New Issue
Block a user