diff options
| author | Bond-009 <bond.009@outlook.com> | 2024-05-25 11:46:14 -0400 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2024-05-25 11:46:14 -0400 |
| commit | c7e0be3c3b5d563e6c2093a6620fefd56f143b4e (patch) | |
| tree | 270e6ee112f7ec865bf02437e372a145587e73f8 | |
| parent | e7145acd560bd53234abcd0fb11dc381fb900dd3 (diff) | |
Backport pull request #11774 from jellyfin/release-10.9.z
Apply audio boost when downmixing regardless of downmixalgo
Original-merge: 06a5ddda5e6123dab6608f8907c8976a92e398e2
Merged-by: nielsvanvelzen <nielsvanvelzen@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 5d5b645f6..bef294429 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -2631,10 +2631,14 @@ namespace MediaBrowser.Controller.MediaEncoding && state.AudioStream.Channels.HasValue && state.AudioStream.Channels.Value == 6) { + if (!encodingOptions.DownMixAudioBoost.Equals(1)) + { + filters.Add("volume=" + encodingOptions.DownMixAudioBoost.ToString(CultureInfo.InvariantCulture)); + } + switch (encodingOptions.DownMixStereoAlgorithm) { case DownMixStereoAlgorithms.Dave750: - filters.Add("volume=4.25"); filters.Add("pan=stereo|c0=0.5*c2+0.707*c0+0.707*c4+0.5*c3|c1=0.5*c2+0.707*c1+0.707*c5+0.5*c3"); break; case DownMixStereoAlgorithms.NightmodeDialogue: @@ -2642,11 +2646,6 @@ namespace MediaBrowser.Controller.MediaEncoding break; case DownMixStereoAlgorithms.None: default: - if (!encodingOptions.DownMixAudioBoost.Equals(1)) - { - filters.Add("volume=" + encodingOptions.DownMixAudioBoost.ToString(CultureInfo.InvariantCulture)); - } - break; } } |
