Author Topic: ReplayGain calculation is broken  (Read 558 times)

pdinklag

  • Newbie
  • *
  • Posts: 1
    • View Profile
ReplayGain calculation is broken
« on: March 11, 2021, 07:18:36 AM »
Hey!
First off, thanks for WACUP! Winamp was becoming a pain to use as it grew slower and slower over time for no apparent reason. So a few months ago, I switched to WACUP and lived happily ever after.  ;D

I've been using ReplayGain since about forever. Now I discovered an album where the computation completely fails using either algorithm, it's freely available here (talking about the FLAC version): https://mathiasfekjaer.com/album/growth

For the first track "Cavedwellers", ReplayGain (original specification) calculates a track gain of +64.82 dB, which is completely crazy. On the other hand, the newer EBU R128 algorithm calculates a gain of -17.78 dB, which is way too quiet and makes it practically silence compared to other tracks.
For the track "Yggdrasil", the original algorithm computes again the same insane value of +64.82 dB, while EBU R128 now computes -8.82 dB, which seems OK for the genre compared with similar albums, but the track is much louder thatn "Cavedwellers" (inconsistent mastering, the album appears to be a collection of compilation tracks) and therefore the gain should be lower.

I booted up Winamp (5.666, latest AFAIK) to see what happens there. It computes a track gain of -2.36 dB for "Cavedwellers" and -7.19 dB for "Yggdrasil", which seems more like it and also reflects the different mastering.

So now I'm sure that something about WACUP's ReplayGain calculation is broken, and the "original specification" is at least not what Winamp did, at all. I'm fairly certain I've never observed this kind of behaviour before the late February update of WACUP, may it be a bug that was introduced? Then again, I never really did a direct Winamp/WACUP comparison before, so I cannot tell for how long this has been this off.

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3162
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: ReplayGain calculation is broken
« Reply #1 on: March 11, 2021, 03:04:57 PM »
I've grabbed copies of it in flac, mp3 & ogg vorbis so I'll look into this over the next few days. I've had reports of some issues with the replaygain processing some time back but didn't have any specific examples to work from (that I can remember).

As i'm not using the exact same code as winamp for the 'original' replaygain specification & there's been other changes, its likely i've just got something not quite right either on the expected form of the input data or it's just software being weird like it can at times :) The newer r128 solution can differ a bit compared to the old one but seeing a +64.82 from the old version is definitely not right.

-dro