mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 23:18:29 +00:00
aaudio: Deal with device recovery.
Android claims to work with multiple devices, but doesn't actually appear to (at least, afaict), and it will report tons of devices that all just seem to play to the current default output, so for now, turn this off and only expose a default device. And then, with that default output, attempt to recover on errors by throwing away the current AAudioStream and building a new one. This let me plug/unplug a set of headphones from the headphone jack and audio would switch correctly to the new output.
This commit is contained in:
@@ -32,6 +32,9 @@ extern "C" {
|
||||
|
||||
#include "../../audio/SDL_sysaudio.h"
|
||||
|
||||
// this appears to be broken right now (on Android, not SDL, I think...?).
|
||||
#define ALLOW_MULTIPLE_ANDROID_AUDIO_DEVICES 0
|
||||
|
||||
/* Interface from the SDL library into the Android Java activity */
|
||||
extern void Android_JNI_SetActivityTitle(const char *title);
|
||||
extern void Android_JNI_SetWindowStyle(SDL_bool fullscreen);
|
||||
|
Reference in New Issue
Block a user