summaryrefslogtreecommitdiffstats
path: root/src/audio_core/common/audio_renderer_parameter.h
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2022-07-17 00:48:45 +0200
committerKelebek1 <eeeedddccc@hotmail.co.uk>2022-07-22 02:11:32 +0200
commit458da8a94877677f086f06cdeecf959ec4283a33 (patch)
tree583166d77602ad90a0d552f37de8729ad80fd6c1 /src/audio_core/common/audio_renderer_parameter.h
parentMerge pull request #8598 from Link4565/recv-dontwait (diff)
downloadyuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar
yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.gz
yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.bz2
yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.lz
yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.xz
yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.zst
yuzu-458da8a94877677f086f06cdeecf959ec4283a33.zip
Diffstat (limited to '')
-rw-r--r--src/audio_core/common/audio_renderer_parameter.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/audio_core/common/audio_renderer_parameter.h b/src/audio_core/common/audio_renderer_parameter.h
new file mode 100644
index 000000000..2f62c383b
--- /dev/null
+++ b/src/audio_core/common/audio_renderer_parameter.h
@@ -0,0 +1,60 @@
+// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <span>
+
+#include "audio_core/renderer/behavior/behavior_info.h"
+#include "audio_core/renderer/memory/memory_pool_info.h"
+#include "audio_core/renderer/upsampler/upsampler_manager.h"
+#include "common/common_types.h"
+
+namespace AudioCore {
+/**
+ * Execution mode of the audio renderer.
+ * Only Auto is currently supported.
+ */
+enum class ExecutionMode : u8 {
+ Auto,
+ Manual,
+};
+
+/**
+ * Parameters from the game, passed to the audio renderer for initialisation.
+ */
+struct AudioRendererParameterInternal {
+ /* 0x00 */ u32 sample_rate;
+ /* 0x04 */ u32 sample_count;
+ /* 0x08 */ u32 mixes;
+ /* 0x0C */ u32 sub_mixes;
+ /* 0x10 */ u32 voices;
+ /* 0x14 */ u32 sinks;
+ /* 0x18 */ u32 effects;
+ /* 0x1C */ u32 perf_frames;
+ /* 0x20 */ u16 voice_drop_enabled;
+ /* 0x22 */ u8 rendering_device;
+ /* 0x23 */ ExecutionMode execution_mode;
+ /* 0x24 */ u32 splitter_infos;
+ /* 0x28 */ s32 splitter_destinations;
+ /* 0x2C */ u32 external_context_size;
+ /* 0x30 */ u32 revision;
+ /* 0x34 */ char unk34[0x4];
+};
+static_assert(sizeof(AudioRendererParameterInternal) == 0x38,
+ "AudioRendererParameterInternal has the wrong size!");
+
+/**
+ * Context for rendering, contains a bunch of useful fields for the command generator.
+ */
+struct AudioRendererSystemContext {
+ s32 session_id;
+ s8 channels;
+ s16 mix_buffer_count;
+ AudioRenderer::BehaviorInfo* behavior;
+ std::span<s32> depop_buffer;
+ AudioRenderer::UpsamplerManager* upsampler_manager;
+ AudioRenderer::MemoryPoolInfo* memory_pool_info;
+};
+
+} // namespace AudioCore