audio_core: Improve audio renderer compatibility and error handling

- Change mix size mismatch from error to warning with recovery
- Adjust input pointer when consumed size doesn't match header size
  to prevent desync and allow processing to continue
- Expand VoiceInfo::InParameter struct by 24 bytes (0x170 -> 0x188)
  to support newer audio renderer versions
- Update static_assert to reflect new structure size

This improves compatibility with games that use newer audio renderer versions or have slight structural differences.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-06-16 17:24:58 +10:00
parent 4aee8c6709
commit c8aeab799d
2 changed files with 13 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2025 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -165,8 +166,9 @@ public:
/* 0x15D */ char unk15D[0x1];
/* 0x15E */ SrcQuality src_quality;
/* 0x15F */ char unk15F[0x11];
/* 0x170 */ char unk170[0x18]; // Additional 24 bytes for newer audio renderer versions
};
static_assert(sizeof(InParameter) == 0x170, "VoiceInfo::InParameter has the wrong size!");
static_assert(sizeof(InParameter) == 0x188, "VoiceInfo::InParameter has the wrong size!");
struct OutStatus {
/* 0x00 */ u64 played_sample_count;