Maufeat
1 day ago
committed by
crueter
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
4 changed files with
11 additions and
14 deletions
-
src/audio_core/renderer/behavior/info_updater.cpp
-
src/audio_core/renderer/behavior/info_updater.h
-
src/audio_core/renderer/splitter/splitter_context.cpp
-
src/audio_core/renderer/splitter/splitter_context.h
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
|
|
|
@ -616,12 +616,11 @@ Result InfoUpdater::UpdateErrorInfo(const BehaviorInfo& behaviour_) { |
|
|
|
} |
|
|
|
|
|
|
|
Result InfoUpdater::UpdateSplitterInfo(SplitterContext& splitter_context) { |
|
|
|
u32 consumed_size{0}; |
|
|
|
if (!splitter_context.Update(input, consumed_size)) { |
|
|
|
if (!splitter_context.Update(input)) { |
|
|
|
return Service::Audio::ResultInvalidUpdateInfo; |
|
|
|
} |
|
|
|
|
|
|
|
input += consumed_size; |
|
|
|
input += in_header->splitter_size; |
|
|
|
|
|
|
|
return ResultSuccess; |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,3 +1,6 @@ |
|
|
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project |
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later |
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project |
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later |
|
|
|
|
|
|
|
@ -35,7 +38,7 @@ class InfoUpdater { |
|
|
|
/* 0x18 */ u32 mix_size{}; |
|
|
|
/* 0x1C */ u32 sinks_size{}; |
|
|
|
/* 0x20 */ u32 performance_buffer_size{}; |
|
|
|
/* 0x24 */ char unk24[4]; |
|
|
|
/* 0x24 */ u32 splitter_size{}; |
|
|
|
/* 0x28 */ u32 render_info_size{}; |
|
|
|
/* 0x2C */ char unk2C[0x10]; |
|
|
|
/* 0x3C */ u32 size{sizeof(UpdateDataHeader)}; |
|
|
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
|
|
|
@ -93,16 +93,14 @@ bool SplitterContext::Initialize(const BehaviorInfo& behavior, |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
bool SplitterContext::Update(const u8* input, u32& consumed_size) { |
|
|
|
bool SplitterContext::Update(const u8* input) { |
|
|
|
auto in_params{reinterpret_cast<const InParameterHeader*>(input)}; |
|
|
|
|
|
|
|
if (destinations_count == 0 || info_count == 0) { |
|
|
|
consumed_size = 0; |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
if (in_params->magic != GetSplitterInParamHeaderMagic()) { |
|
|
|
consumed_size = 0; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
@ -113,8 +111,6 @@ bool SplitterContext::Update(const u8* input, u32& consumed_size) { |
|
|
|
u32 offset{sizeof(InParameterHeader)}; |
|
|
|
offset = UpdateInfo(input, offset, in_params->info_count); |
|
|
|
offset = UpdateData(input, offset, in_params->destination_count); |
|
|
|
|
|
|
|
consumed_size = Common::AlignUp(offset, 0x10); |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project |
|
|
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project |
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later |
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project |
|
|
|
@ -104,9 +104,8 @@ public: |
|
|
|
* |
|
|
|
* @param input - Input buffer with the new info, |
|
|
|
* expected to point to a InParameterHeader. |
|
|
|
* @param consumed_size - Output with the number of bytes consumed from input. |
|
|
|
*/ |
|
|
|
bool Update(const u8* input, u32& consumed_size); |
|
|
|
bool Update(const u8* input); |
|
|
|
|
|
|
|
/** |
|
|
|
* Update the splitters. |
|
|
|
|