aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Dto/DtoService.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2024-04-30 13:15:51 -0600
committerGitHub <noreply@github.com>2024-04-30 13:15:51 -0600
commit48bb16472f7ed62ee74c98a51dea3bf3ee135de2 (patch)
tree0dff8fb5e9c010aca0fb12ab4887e8b18823b832 /Emby.Server.Implementations/Dto/DtoService.cs
parent74f3e54807ab306897f592c57478cd28b96280d2 (diff)
parent9ffb07d67fd7d2c08cafff9081f38faac51b7e43 (diff)
Merge pull request #11457 from Bond-009/audionormalization
Diffstat (limited to 'Emby.Server.Implementations/Dto/DtoService.cs')
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index 98eacb52b..19902b26a 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -898,7 +898,15 @@ namespace Emby.Server.Implementations.Dto
dto.IsPlaceHolder = supportsPlaceHolders.IsPlaceHolder;
}
- dto.LUFS = item.LUFS;
+ if (item.LUFS.HasValue)
+ {
+ // -18 LUFS reference, same as ReplayGain 2.0, compatible with ReplayGain 1.0
+ dto.NormalizationGain = -18f - item.LUFS;
+ }
+ else if (item.NormalizationGain.HasValue)
+ {
+ dto.NormalizationGain = item.NormalizationGain;
+ }
// Add audio info
if (item is Audio audio)