From a9cce243a0a691d58c708e1a486f1e947825227b Mon Sep 17 00:00:00 2001 From: Sylvain Date: Sun, 18 Dec 2022 12:20:12 +0100 Subject: [PATCH 1/2] Android OpenSLES: use common DetectDevices function --- src/audio/openslES/SDL_openslES.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/openslES/SDL_openslES.c b/src/audio/openslES/SDL_openslES.c index e3ec9be22..c8fe49a42 100644 --- a/src/audio/openslES/SDL_openslES.c +++ b/src/audio/openslES/SDL_openslES.c @@ -723,7 +723,7 @@ static SDL_bool openslES_Init(SDL_AudioDriverImpl *impl) LOGI("openslES_Init() - set pointers"); /* Set the function pointers */ - /* impl->DetectDevices = openslES_DetectDevices; */ + impl->DetectDevices = Android_DetectDevices; impl->OpenDevice = openslES_OpenDevice; impl->WaitDevice = openslES_WaitDevice; impl->PlayDevice = openslES_PlayDevice; From e7a34fc02380802f72611e6843dbcb662a87e687 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Sun, 18 Dec 2022 12:34:35 +0100 Subject: [PATCH 2/2] OpenSLES for DetectDevices: turn AllowsArbitraryDeviceNames on, and OnlyHasDefault*Device Off --- src/audio/openslES/SDL_openslES.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/audio/openslES/SDL_openslES.c b/src/audio/openslES/SDL_openslES.c index c8fe49a42..374fadbbd 100644 --- a/src/audio/openslES/SDL_openslES.c +++ b/src/audio/openslES/SDL_openslES.c @@ -734,8 +734,9 @@ static SDL_bool openslES_Init(SDL_AudioDriverImpl *impl) /* and the capabilities */ impl->HasCaptureSupport = SDL_TRUE; - impl->OnlyHasDefaultOutputDevice = SDL_TRUE; - impl->OnlyHasDefaultCaptureDevice = SDL_TRUE; + impl->OnlyHasDefaultOutputDevice = SDL_FALSE; + impl->OnlyHasDefaultCaptureDevice = SDL_FALSE; + impl->AllowsArbitraryDeviceNames = SDL_TRUE; LOGI("openslES_Init() - success");