diff options
| author | Bond_009 <bond.009@outlook.com> | 2024-04-28 15:18:53 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2024-04-28 15:18:53 +0200 |
| commit | 88a38a61b59c20b64b5d993364dea2e1d7160d9f (patch) | |
| tree | a49fd877fa56f7502dcaecf4d3b56866bbaf5de7 /Emby.Server.Implementations/Dto/DtoService.cs | |
| parent | 5612cb81780aaaae581b87062445d1829e71a4a9 (diff) | |
Improve audio normalization
* Move calculation of LUFS to a scheduled task as it's pretty slow
* Correctly calculate album LUFS
* Don't try to convert replaygain tags to LUFS values
Diffstat (limited to 'Emby.Server.Implementations/Dto/DtoService.cs')
| -rw-r--r-- | Emby.Server.Implementations/Dto/DtoService.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 98eacb52b..a82258bae 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -898,7 +898,14 @@ namespace Emby.Server.Implementations.Dto dto.IsPlaceHolder = supportsPlaceHolders.IsPlaceHolder; } - dto.LUFS = item.LUFS; + if (item.LUFS.HasValue) + { + dto.NormalizationGain = -18f - item.LUFS; + } + else if (item.NormalizationGain.HasValue) + { + dto.NormalizationGain = item.NormalizationGain; + } // Add audio info if (item is Audio audio) |
