From 6851e93296969e1f990ebc12e2a46026dc34ccce Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 16 Dec 2023 12:54:40 -0500 Subject: audio: skip coefficient normalization for downmix --- src/audio_core/sink/sink_stream.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp index 97866f417..c047b0668 100644 --- a/src/audio_core/sink/sink_stream.cpp +++ b/src/audio_core/sink/sink_stream.cpp @@ -42,11 +42,9 @@ void SinkStream::AppendBuffer(SinkBuffer& buffer, std::span samples) { // We're given 6 channels, but our device only outputs 2, so downmix. // Front = 1.0 // Center = 0.596 - // Back = 0.707 // LFE = 0.354 - // 1.0 + 0.596 + 0.707 + 0.354 = 2.657, 1/2.657 = 0.37636f downscale coefficient - static constexpr std::array down_mix_coeff{0.37636f, 0.22431056f, 0.13323144f, - 0.26608652f}; + // Back = 0.707 + static constexpr std::array down_mix_coeff{1.0, 0.596f, 0.354f, 0.707f}; for (u32 read_index = 0, write_index = 0; read_index < samples.size(); read_index += system_channels, write_index += device_channels) { -- cgit v1.2.3