summaryrefslogtreecommitdiffstats
path: root/src/audio_core/renderer/effect/capture.h
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-07-23 21:20:39 +0200
committerGitHub <noreply@github.com>2022-07-23 21:20:39 +0200
commit97729fd8e9c2f8cabc626ab03a666c9428e01c5e (patch)
treef6a2f3b6c71b51a646d1502c01a4f6be92a3ed26 /src/audio_core/renderer/effect/capture.h
parentMerge pull request #8629 from Docteh/test_transifex (diff)
parentProject Andio (diff)
downloadyuzu-97729fd8e9c2f8cabc626ab03a666c9428e01c5e.tar
yuzu-97729fd8e9c2f8cabc626ab03a666c9428e01c5e.tar.gz
yuzu-97729fd8e9c2f8cabc626ab03a666c9428e01c5e.tar.bz2
yuzu-97729fd8e9c2f8cabc626ab03a666c9428e01c5e.tar.lz
yuzu-97729fd8e9c2f8cabc626ab03a666c9428e01c5e.tar.xz
yuzu-97729fd8e9c2f8cabc626ab03a666c9428e01c5e.tar.zst
yuzu-97729fd8e9c2f8cabc626ab03a666c9428e01c5e.zip
Diffstat (limited to '')
-rw-r--r--src/audio_core/renderer/effect/capture.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/audio_core/renderer/effect/capture.h b/src/audio_core/renderer/effect/capture.h
new file mode 100644
index 000000000..6fbed8e6b
--- /dev/null
+++ b/src/audio_core/renderer/effect/capture.h
@@ -0,0 +1,65 @@
+// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <array>
+
+#include "audio_core/common/common.h"
+#include "audio_core/renderer/effect/effect_info_base.h"
+#include "common/common_types.h"
+
+namespace AudioCore::AudioRenderer {
+
+class CaptureInfo : public EffectInfoBase {
+public:
+ /**
+ * Update the info with new parameters, version 1.
+ *
+ * @param error_info - Used to write call result code.
+ * @param in_params - New parameters to update the info with.
+ * @param pool_mapper - Pool for mapping buffers.
+ */
+ void Update(BehaviorInfo::ErrorInfo& error_info, const InParameterVersion1& in_params,
+ const PoolMapper& pool_mapper) override;
+
+ /**
+ * Update the info with new parameters, version 2.
+ *
+ * @param error_info - Used to write call result code.
+ * @param in_params - New parameters to update the info with.
+ * @param pool_mapper - Pool for mapping buffers.
+ */
+ void Update(BehaviorInfo::ErrorInfo& error_info, const InParameterVersion2& in_params,
+ const PoolMapper& pool_mapper) override;
+
+ /**
+ * Update the info after command generation. Usually only changes its state.
+ */
+ void UpdateForCommandGeneration() override;
+
+ /**
+ * Initialize a new result state. Version 2 only, unused.
+ *
+ * @param result_state - Result state to initialize.
+ */
+ void InitializeResultState(EffectResultState& result_state) override;
+
+ /**
+ * Update the host-side state with the ADSP-side state. Version 2 only, unused.
+ *
+ * @param cpu_state - Host-side result state to update.
+ * @param dsp_state - AudioRenderer-side result state to update from.
+ */
+ void UpdateResultState(EffectResultState& cpu_state, EffectResultState& dsp_state) override;
+
+ /**
+ * Get a workbuffer assigned to this effect with the given index.
+ *
+ * @param index - Workbuffer index.
+ * @return Address of the buffer.
+ */
+ CpuAddr GetWorkbuffer(s32 index) override;
+};
+
+} // namespace AudioCore::AudioRenderer