summaryrefslogtreecommitdiffstats
path: root/src/audio_core/effect_context.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2020-07-12 13:59:14 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2020-07-25 04:39:34 +0200
commit380658c21d39cf05ac765a9284da246388cca2a4 (patch)
tree1416cd7e9aee96ec40675078d16a8240d410d04b /src/audio_core/effect_context.cpp
parentMerge pull request #4377 from Morph1984/dark-themes (diff)
downloadyuzu-380658c21d39cf05ac765a9284da246388cca2a4.tar
yuzu-380658c21d39cf05ac765a9284da246388cca2a4.tar.gz
yuzu-380658c21d39cf05ac765a9284da246388cca2a4.tar.bz2
yuzu-380658c21d39cf05ac765a9284da246388cca2a4.tar.lz
yuzu-380658c21d39cf05ac765a9284da246388cca2a4.tar.xz
yuzu-380658c21d39cf05ac765a9284da246388cca2a4.tar.zst
yuzu-380658c21d39cf05ac765a9284da246388cca2a4.zip
Diffstat (limited to 'src/audio_core/effect_context.cpp')
-rw-r--r--src/audio_core/effect_context.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/audio_core/effect_context.cpp b/src/audio_core/effect_context.cpp
new file mode 100644
index 000000000..c42e71c1c
--- /dev/null
+++ b/src/audio_core/effect_context.cpp
@@ -0,0 +1,39 @@
+// Copyright 2020 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "audio_core/effect_context.h"
+
+namespace AudioCore {
+EffectContext::EffectContext(std::size_t effect_count) : effect_count(effect_count) {
+ for (std::size_t i = 0; i < effect_count; i++) {
+ effects.push_back(std::make_unique<EffectStubbed>());
+ }
+}
+EffectContext::~EffectContext() = default;
+
+std::size_t EffectContext::GetCount() const {
+ return effect_count;
+}
+
+EffectBase* EffectContext::GetInfo(std::size_t i) {
+ return effects.at(i).get();
+}
+
+EffectStubbed::EffectStubbed() : EffectBase::EffectBase() {}
+EffectStubbed::~EffectStubbed() = default;
+
+void EffectStubbed::Update(EffectInfo::InParams& in_params) {
+ if (in_params.is_new) {
+ usage = UsageStatus::New;
+ }
+}
+
+EffectBase::EffectBase() = default;
+EffectBase::~EffectBase() = default;
+
+UsageStatus EffectBase::GetUsage() const {
+ return usage;
+}
+
+} // namespace AudioCore