Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2012-10-05 21:48:25 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2012-10-05 21:48:25 +0400
commit50a1358e6967b539c3417885d6873ea969d91253 (patch)
tree9ccbb485392db7166ea3dee5b2fca815965e450e /decoder/LAVAudio
parent26524895bed3426c6ac4604a419f028610100676 (diff)
Properly scale the LFE mix level to be consistent with the center and surround levels.
Diffstat (limited to 'decoder/LAVAudio')
-rw-r--r--decoder/LAVAudio/PostProcessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/LAVAudio/PostProcessor.cpp b/decoder/LAVAudio/PostProcessor.cpp
index a7be332e..cb20b8fd 100644
--- a/decoder/LAVAudio/PostProcessor.cpp
+++ b/decoder/LAVAudio/PostProcessor.cpp
@@ -606,7 +606,7 @@ HRESULT CLAVAudio::PerformMixing(BufferDetails *buffer)
const double center_mix_level = (double)m_settings.MixingCenterLevel / 10000.0 / M_SQRT1_2;
const double surround_mix_level = (double)m_settings.MixingSurroundLevel / 10000.0;
- const double lfe_mix_level = (double)m_settings.MixingLFELevel / 10000.0;
+ const double lfe_mix_level = (double)m_settings.MixingLFELevel / 10000.0 / (dwMixingLayout == AV_CH_LAYOUT_MONO ? 1.0 : M_SQRT1_2);
ret = avresample_build_matrix(buffer->dwChannelMask, dwMixingLayout, center_mix_level, surround_mix_level, lfe_mix_level, bNormalize, matrix_dbl, in_ch, (AVMatrixEncoding)m_settings.MixingMode);
if (ret < 0) {
DbgLog((LOG_ERROR, 10, L"avresample_build_matrix failed, layout in: %x, out: %x, sample fmt in: %d, out: %d", buffer->dwChannelMask, dwMixingLayout, buffer->sfFormat, m_sfRemixFormat));