Commit fe6b8dc0 authored by David Reid's avatar David Reid

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

Public issue https://github.com/mackron/miniaudio/issues/379
parent 0c6dfa69
...@@ -36043,7 +36043,7 @@ static ma_result ma_device_init__opensl(ma_device* pDevice, const ma_device_conf ...@@ -36043,7 +36043,7 @@ static ma_result ma_device_init__opensl(ma_device* pDevice, const ma_device_conf
locatorDevice.locatorType = SL_DATALOCATOR_IODEVICE; locatorDevice.locatorType = SL_DATALOCATOR_IODEVICE;
locatorDevice.deviceType = SL_IODEVICE_AUDIOINPUT; 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; locatorDevice.device = NULL;
source.pLocator = &locatorDevice; source.pLocator = &locatorDevice;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment