mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
AAudio: Fix ma_device_get_info() implementation
This commit is contained in:
committed by
David Reid
parent
35215b266c
commit
fc45d8ca06
@@ -10,6 +10,7 @@ v0.11.22 - TBD
|
||||
* 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.
|
||||
* 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
|
||||
|
||||
+2
-2
@@ -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(pDeviceInfo != NULL);
|
||||
|
||||
if (type == ma_device_type_playback) {
|
||||
if (type == ma_device_type_capture) {
|
||||
pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamCapture;
|
||||
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. */
|
||||
}
|
||||
if (type == ma_device_type_capture) {
|
||||
if (type == ma_device_type_playback) {
|
||||
pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback;
|
||||
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. */
|
||||
|
||||
Reference in New Issue
Block a user