diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-07-08 18:09:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 18:09:21 +0200 |
commit | 91a4a924b13b50f5b86fac732575c22e40d21891 (patch) | |
tree | 6511301bcbebc5b9ed6c9a1c64b19b3a8b2179dd /src/audio_core/sink_context.cpp | |
parent | Merge pull request #6567 from Kelebek1/Audio2 (diff) | |
parent | audio_core: Preserve front channel volume after 6 to 2 downmix (diff) | |
download | yuzu-91a4a924b13b50f5b86fac732575c22e40d21891.tar yuzu-91a4a924b13b50f5b86fac732575c22e40d21891.tar.gz yuzu-91a4a924b13b50f5b86fac732575c22e40d21891.tar.bz2 yuzu-91a4a924b13b50f5b86fac732575c22e40d21891.tar.lz yuzu-91a4a924b13b50f5b86fac732575c22e40d21891.tar.xz yuzu-91a4a924b13b50f5b86fac732575c22e40d21891.tar.zst yuzu-91a4a924b13b50f5b86fac732575c22e40d21891.zip |
Diffstat (limited to 'src/audio_core/sink_context.cpp')
-rw-r--r-- | src/audio_core/sink_context.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/audio_core/sink_context.cpp b/src/audio_core/sink_context.cpp index a69543696..cc55b290c 100644 --- a/src/audio_core/sink_context.cpp +++ b/src/audio_core/sink_context.cpp @@ -15,10 +15,17 @@ std::size_t SinkContext::GetCount() const { void SinkContext::UpdateMainSink(const SinkInfo::InParams& in) { ASSERT(in.type == SinkTypes::Device); - has_downmix_coefs = in.device.down_matrix_enabled; - if (has_downmix_coefs) { + 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; @@ -34,10 +41,6 @@ std::vector<u8> SinkContext::OutputBuffers() const { return buffer_ret; } -bool SinkContext::HasDownMixingCoefficients() const { - return has_downmix_coefs; -} - const DownmixCoefficients& SinkContext::GetDownmixCoefficients() const { return downmix_coefficients; } |