From fe6b8dc08f79f1844c658032ddc889aa83310d79 Mon Sep 17 00:00:00 2001 From: David Reid Date: Wed, 22 Dec 2021 17:31:18 +1000 Subject: [PATCH] OpenSL: Always force the use of the default device on Android. Public issue https://github.com/mackron/miniaudio/issues/379 --- miniaudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index 2b56b45c..e916c5ad 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -36043,7 +36043,7 @@ static ma_result ma_device_init__opensl(ma_device* pDevice, const ma_device_conf locatorDevice.locatorType = SL_DATALOCATOR_IODEVICE; locatorDevice.deviceType = SL_IODEVICE_AUDIOINPUT; - locatorDevice.deviceID = (pDescriptorCapture->pDeviceID == NULL) ? SL_DEFAULTDEVICEID_AUDIOINPUT : pDescriptorCapture->pDeviceID->opensl; + locatorDevice.deviceID = SL_DEFAULTDEVICEID_AUDIOINPUT; /* Must always use the default device with Android. */ locatorDevice.device = NULL; source.pLocator = &locatorDevice;