mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-26 12:27:44 +00:00
Added WASAPI support for SDL_HINT_AUDIO_DEVICE_STREAM_ROLE
Also added SDL_HINT_AUDIO_DEVICE_RAW_STREAM Fixes https://github.com/libsdl-org/SDL/issues/14091
This commit is contained in:
@@ -62,13 +62,17 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
|
||||
consumed = SDLTest_CommonArg(state, i);
|
||||
if (!consumed) {
|
||||
if (!filename) {
|
||||
if (SDL_strcmp(argv[i], "--role") == 0 && argv[i + 1]) {
|
||||
SDL_SetHint(SDL_HINT_AUDIO_DEVICE_STREAM_ROLE, argv[i + 1]);
|
||||
++i;
|
||||
consumed = 1;
|
||||
} else if (!filename) {
|
||||
filename = argv[i];
|
||||
consumed = 1;
|
||||
}
|
||||
}
|
||||
if (consumed <= 0) {
|
||||
static const char *options[] = { "[sample.wav]", NULL };
|
||||
static const char *options[] = { "[--role ROLE]", "[sample.wav]", NULL };
|
||||
SDLTest_CommonLogUsage(state, argv[0], options);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user