OpenSL: Always force the use of the default device on Android.

Public issue https://github.com/mackron/miniaudio/issues/379
This commit is contained in:
David Reid
2021-12-22 17:31:18 +10:00
parent 0c6dfa6911
commit fe6b8dc08f
+1 -1
View File
@@ -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;