From 1b6d634299d34f0af11d110314a931c827ca76a1 Mon Sep 17 00:00:00 2001 From: znakeeye Date: Sun, 29 Dec 2024 15:26:29 +0100 Subject: [PATCH] Changed log level for re-routing errors. --- miniaudio.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index 062232a0..e8b3e2da 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -38369,13 +38369,16 @@ static ma_result ma_device_reinit__aaudio(ma_device* pDevice, ma_device_type dev result = ma_device_init__aaudio(pDevice, &deviceConfig, &descriptorPlayback, &descriptorCapture); if (result != MA_SUCCESS) { - ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[AAudio] Failed to create stream."); + ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[AAudio] Failed to create stream after route change."); + ma_device__set_state(pDevice, ma_device_state_stopped); return result; } result = ma_device_post_init(pDevice, deviceType, &descriptorPlayback, &descriptorCapture); if (result != MA_SUCCESS) { + ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[AAudio] Failed to initialize device after route change."); ma_device_uninit__aaudio(pDevice); + ma_device__set_state(pDevice, ma_device_state_stopped); return result; }