mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-18 10:48:28 +00:00
Mirror of SDL
![]() Zombie devices just sit there doing nothing until a new default device is chosen, and then they migrate all their logical devices before being destroyed. This lets the system deal with the likely outcome of a USB headset being the default audio device, and when its cable is yanked out, the backend will likely announce this _before_ it chooses a new default (or, perhaps, the only device in the system got yanked out and there _isn't_ a new default to be had until the user plugs the cable back in). This lets the audio device hold on without disturbing the app until it can seamlessly migrate audio, and it also means the backend does not have to be careful in how it announces device events, since SDL will manage the time between a device loss and its replacement. Note that this _only_ applies to things opened as the default device (SDL_AUDIO_DEVICE_DEFAULT_OUTPUT, etc). If those USB headphones are the default, and one SDL_OpenAudioDevice() call asked for them specifically and the other just said "give me the system default," the explicitly requested open will get a device-lost notification immediately. The other open will live on as a zombie until it can migrate to the new default. This drops the complexity of the PulseAudio hotplug thread dramatically, back to what it was previously, since it no longer needs to fight against Pulse's asychronous nature, but just report device disconnects and new default choices as they arrive. loopwave has been updated to not check for device removals anymore; since it opens the default device, this is now managed for it; it no longer needs to close and reopen a device, and as far as it knows, the device is never lost in the first place. |
||
---|---|---|
.github | ||
android-project | ||
build-scripts | ||
cmake | ||
docs | ||
include | ||
mingw/pkg-support/cmake | ||
src | ||
test | ||
VisualC | ||
VisualC-GDK | ||
VisualC-WinRT | ||
wayland-protocols | ||
Xcode | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.gitignore | ||
.wikiheaders-options | ||
Android.mk | ||
BUGS.txt | ||
CMakeLists.txt | ||
CREDITS.txt | ||
INSTALL.txt | ||
LICENSE.txt | ||
README-SDL.txt | ||
README.md | ||
TODO.txt | ||
WhatsNew.txt |
Simple DirectMedia Layer (SDL) Version 3.0
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting with README.md
Enjoy!
Sam Lantinga (slouken@libsdl.org)