Commit fc45d8ca authored by Matthieu Bouron's avatar Matthieu Bouron Committed by David Reid

AAudio: Fix ma_device_get_info() implementation

parent 35215b26
...@@ -10,6 +10,7 @@ v0.11.22 - TBD ...@@ -10,6 +10,7 @@ v0.11.22 - TBD
* Web: Fix an error with the unlocked notification when compiling as C++. * Web: Fix an error with the unlocked notification when compiling as C++.
* Web: Fix a JavaScript error when initializing and then uninitializing a context before any interactivity. * Web: Fix a JavaScript error when initializing and then uninitializing a context before any interactivity.
* AAudio: The default minimum SDK version has been increased from 26 to 27 when enabling AAudio. If you need to support version 26, you can use `#define MA_AAUDIO_MIN_ANDROID_SDK_VERSION 26`. * AAudio: The default minimum SDK version has been increased from 26 to 27 when enabling AAudio. If you need to support version 26, you can use `#define MA_AAUDIO_MIN_ANDROID_SDK_VERSION 26`.
* AAudio: Fix ma_device_get_info() implementation
v0.11.21 - 2023-11-15 v0.11.21 - 2023-11-15
......
...@@ -38357,12 +38357,12 @@ static ma_result ma_device_get_info__aaudio(ma_device* pDevice, ma_device_type t ...@@ -38357,12 +38357,12 @@ static ma_result ma_device_get_info__aaudio(ma_device* pDevice, ma_device_type t
MA_ASSERT(type != ma_device_type_duplex); MA_ASSERT(type != ma_device_type_duplex);
MA_ASSERT(pDeviceInfo != NULL); MA_ASSERT(pDeviceInfo != NULL);
if (type == ma_device_type_playback) { if (type == ma_device_type_capture) {
pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamCapture; pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamCapture;
pDeviceInfo->id.aaudio = pDevice->capture.id.aaudio; pDeviceInfo->id.aaudio = pDevice->capture.id.aaudio;
ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); /* Only supporting default devices. */ ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); /* Only supporting default devices. */
} }
if (type == ma_device_type_capture) { if (type == ma_device_type_playback) {
pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback; pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback;
pDeviceInfo->id.aaudio = pDevice->playback.id.aaudio; pDeviceInfo->id.aaudio = pDevice->playback.id.aaudio;
ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); /* Only supporting default devices. */ ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); /* Only supporting default devices. */
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