Android OpenSLES: use common DetectDevices function
Android OpenSLES: use common DetectDevices function
and so, this should also immediate for OpenSLES, @v3rm0n ?
Not sure if it would break anything but currently it wouldn't do much because openSLES driver does not have AllowsArbitraryDeviceNames set to true.
Just adding it
impl->OnlyHasDefaultOutputDevice = SDL_FALSE;
impl->OnlyHasDefaultCaptureDevice = SDL_FALSE;
impl->AllowsArbitraryDeviceNames = SDL_TRUE;
Looks better, but I haven't found a way to pass the device information to openSLES so it would actually try to use the chosen device...
Also a separate issue maybe: event handlers (adding/removing audio devices) can run before audio system is inited and since the driver is null they will error out.
devname is sent to opensles.
for capture, it seems there is openslES_CreatePCMRecorder that should be modified to fill:
255 loc_dev.locatorType = SL_DATALOCATOR_IODEVICE;
256 loc_dev.deviceType = SL_IODEVICE_AUDIOINPUT;
257 loc_dev.deviceID = SL_DEFAULTDEVICEID_AUDIOINPUT;
258 loc_dev.device = NULL;
but for output, not so obvious to select the device
This hasn't been updated in a while and we're cleaning house for SDL 3.0. Please feel free to reopen this if you'd like to clean it up and get it in!