Revert "audio_core: Improve audio renderer compatibility and error handling"

This reverts commit c8aeab799d.
This commit is contained in:
Zephyron
2025-06-23 19:15:09 +10:00
parent 39ed0afa1f
commit 9e49ff3897
2 changed files with 5 additions and 13 deletions

View File

@@ -1,5 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "audio_core/common/feature_support.h"
@@ -326,18 +325,13 @@ Result InfoUpdater::UpdateMixes(MixContext& mix_context, const u32 mix_buffer_co
}
if (consumed_input_size != in_header->mix_size) {
LOG_WARNING(Service_Audio, "Consumed an incorrect mixes size, header size={}, consumed={}, adjusting input pointer",
LOG_ERROR(Service_Audio, "Consumed an incorrect mixes size, header size={}, consumed={}",
in_header->mix_size, consumed_input_size);
// Calculate the adjustment needed
const auto adjustment = in_header->mix_size - consumed_input_size;
// Adjust input pointer to match expected header size to prevent desync
input = reinterpret_cast<const u8*>(input) + adjustment;
// Also adjust the expected input size for CheckConsumedSize
expected_input_size += adjustment;
// Continue processing instead of failing
return Service::Audio::ResultInvalidUpdateInfo;
}
// Input pointer adjustment is now handled in the size check above
input += mix_count * sizeof(MixInfo::InParameter);
return ResultSuccess;
}

View File

@@ -1,5 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2025 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -166,9 +165,8 @@ 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) == 0x188, "VoiceInfo::InParameter has the wrong size!");
static_assert(sizeof(InParameter) == 0x170, "VoiceInfo::InParameter has the wrong size!");
struct OutStatus {
/* 0x00 */ u64 played_sample_count;