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

[Bug]: Quality Info does not display actual ReplayGain in all scenarios #2870

Open
3 tasks done
NaanProphet opened this issue Feb 19, 2024 · 1 comment
Open
3 tasks done
Labels
bug triage New bug reports that need to be evaluated

Comments

@NaanProphet
Copy link

NaanProphet commented Feb 19, 2024

I confirm that:

  • I have searched the existing open AND closed issues to see if an issue already exists for the bug I've encountered
  • I'm using the latest version (your issue may have been fixed already)

Version

0.51.0 (fd61b29)

Current Behavior

Hello first of all thanks to everyone who contributed to #1988 and made ReplayGain support possible!

I was going through 1324a16 and there is a discrepancy between how the actual gain is calculated and what is displayed in the Quality Info hover. Tthis occurs when there is a positive gain but the peak is at or near 1.

Just to illustrate, I tagged a peak 0 dB file with album gain +10 dB and track gain -10 dB. I left the preamp gain at 0 dB in the Navidrome web browser.

  • If I apply album gain, the volume does not change, even though hovering over the track name shows <bitrate> 10 dB.
  • If I switch to track gain, hovering over the title shows <bitrate> -10 dB and the sound actually sounds softer.

Expected Behavior

Option 1

Instead of determining Quality Info solely using the tags:

if (gainMode !== 'none') {
info += ` (${
(gainMode === 'album' ? record.albumGain : record.trackGain) + preAmp
} dB)`
}

Display the same value as returned by the calculateReplayGain function:

function calculateReplayGain(preAmp, gain, peak) {
if (gain === undefined || peak === undefined) {
return 1
}
// https://wiki.hydrogenaud.io/index.php?title=ReplayGain_1.0_specification&section=19
// Normalized to max gain
return Math.min(10 ** ((gain + preAmp) / 20), 1 / peak)
}

Option 2

Provide the user the option to ignore peak tags

Steps To Reproduce

  1. Enable ReplayGain in Navidrome
  2. Tag a file where Peak = 1 (no headroom) and Replay Gain value is > 0 dB
  3. Leave Navidrome Preamp = 0 dB
  4. Playback the file in Navidrome Web Client
  5. There is no volume change but Quality Info suggests there is

Environment

- OS: macOS Sonoma 14.2.1 (23C71)
- Browser: Safari Version 17.2.1 (19617.1.17.11.12)
- Client: Navidrome Web Client

How Navidrome is installed?

Docker

Configuration

No response

Relevant log output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow Navidrome's Code of Conduct
@NaanProphet NaanProphet added bug triage New bug reports that need to be evaluated labels Feb 19, 2024
@GuoYuefei
Copy link

EnableReplayGain = false
but have same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage New bug reports that need to be evaluated
Projects
None yet
Development

No branches or pull requests

2 participants