diff options
author | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2022-07-17 00:48:45 +0200 |
---|---|---|
committer | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2022-07-22 02:11:32 +0200 |
commit | 458da8a94877677f086f06cdeecf959ec4283a33 (patch) | |
tree | 583166d77602ad90a0d552f37de8729ad80fd6c1 /src/audio_core/sink_context.cpp | |
parent | Merge pull request #8598 from Link4565/recv-dontwait (diff) | |
download | yuzu-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 'src/audio_core/sink_context.cpp')
-rw-r--r-- | src/audio_core/sink_context.cpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/audio_core/sink_context.cpp b/src/audio_core/sink_context.cpp deleted file mode 100644 index 835e12f67..000000000 --- a/src/audio_core/sink_context.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "audio_core/sink_context.h" - -namespace AudioCore { -SinkContext::SinkContext(std::size_t sink_count_) : sink_count{sink_count_} {} -SinkContext::~SinkContext() = default; - -std::size_t SinkContext::GetCount() const { - return sink_count; -} - -void SinkContext::UpdateMainSink(const SinkInfo::InParams& in) { - ASSERT(in.type == SinkTypes::Device); - - if (in.device.down_matrix_enabled) { - downmix_coefficients = in.device.down_matrix_coef; - } else { - downmix_coefficients = { - 1.0f, // front - 0.707f, // center - 0.0f, // lfe - 0.707f, // back - }; - } - - in_use = in.in_use; - use_count = in.device.input_count; - buffers = in.device.input; -} - -bool SinkContext::InUse() const { - return in_use; -} - -std::vector<u8> SinkContext::OutputBuffers() const { - std::vector<u8> buffer_ret(use_count); - std::memcpy(buffer_ret.data(), buffers.data(), use_count); - return buffer_ret; -} - -const DownmixCoefficients& SinkContext::GetDownmixCoefficients() const { - return downmix_coefficients; -} - -} // namespace AudioCore |