From 380658c21d39cf05ac765a9284da246388cca2a4 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sun, 12 Jul 2020 21:59:14 +1000 Subject: audio_core: Apollo Part 1, AudioRenderer refactor --- src/audio_core/effect_context.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/audio_core/effect_context.cpp (limited to 'src/audio_core/effect_context.cpp') 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()); + } +} +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 -- cgit v1.2.3