Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement normalization gain for music tracks #3660

Merged

Conversation

nielsvanvelzen
Copy link
Member

@nielsvanvelzen nielsvanvelzen commented Jun 10, 2024

First 10.9 feature!

Changes

  • Add new "normalizationGain" element
  • Populate normalization gain for BaseItemDto
    • Currently sets it for the playable item, so for music this means each track. Support for album gain will be possible once we switch queue building to the SDK (currently converts the generated queue from legacy playback)
  • Add "audio pipeline" to ExoPlayer implementation. This will be used for all audio effects going forward. Currently implements the normalization gain element.

Issues

Part of #1057

@nielsvanvelzen nielsvanvelzen added enhancement New feature or request playback Issue related to media playback labels Jun 10, 2024
@nielsvanvelzen nielsvanvelzen added this to the v0.17.0 milestone Jun 10, 2024
private fun applyGain() {
val targetGain = normalizationGain
// Convert to millibels
?.times(100f)

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
@nielsvanvelzen nielsvanvelzen merged commit 4727056 into jellyfin:master Jun 10, 2024
5 checks passed
@nielsvanvelzen nielsvanvelzen deleted the playback-normalization-gain branch June 10, 2024 17:41
@nielsvanvelzen nielsvanvelzen mentioned this pull request Jun 10, 2024
35 tasks
@nielsvanvelzen nielsvanvelzen added the release-highlight Pull request might be suitable for mentioning in the release blog post label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request playback Issue related to media playback release-highlight Pull request might be suitable for mentioning in the release blog post
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants