android: Reworked audio backends for SDL3 audio API.

This involved moving an `#ifdef` out of SDL_audio.c for thread priority,
so the default ThreadInit now does the usual stuff for non-Android platforms,
the Android platforms provide an implementatin of ThreadInit with their
side of the `#ifdef` and other platforms that implement ThreadInit
incorporated the appropriate code...which is why WASAPI is touched in here.

The Android bits compile, but have not been tested, and there was some
reworkings in the Java bits, so this might need some further fixes still.
This commit is contained in:
Ryan C. Gordon 2023-07-26 15:45:40 -04:00
parent 54af687210
commit 5ff87c6d4a
No known key found for this signature in database
GPG key ID: FA148B892AB48044
10 changed files with 485 additions and 720 deletions

View file

@ -86,7 +86,10 @@ void WASAPI_PlatformThreadInit(SDL_AudioDevice *device)
if (pAvSetMmThreadCharacteristicsW) {
DWORD idx = 0;
device->hidden->task = pAvSetMmThreadCharacteristicsW(L"Pro Audio", &idx);
} else {
SDL_SetThreadPriority(device->iscapture ? SDL_THREAD_PRIORITY_HIGH : SDL_THREAD_PRIORITY_TIME_CRITICAL);
}
}
void WASAPI_PlatformThreadDeinit(SDL_AudioDevice *device)