Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
(Replay) Gain adjustments are not applied during the first split second of a song #1905
I have supplied most of my albums with ReplayGain values and have also set a fallback gain of -9.0 dB in the preferences. However, it seems to me that after starting playback, there is a short delay before Quod Libet applies any of these gain adjustments. In my case, this leads to the first split second of a song being played back considerably louder and followed by a sudden volume drop.
I can reproduce this phenomenon in automatic, album and track mode. It obviously happens only on manually starting playback, not when Quod Libet jumps to the next song automatically, e.g. when one song ends and QL plays back the next item in the queue/song list.
QuodLibet 3.6.0 with OS X 10.11.4 El Capitan
I am using 3.8.1, and tried a certain latest 3.9 development version on OS X 10.11.6 El Capitan. They both have this issue.
I think inserting a short silence into every started song would just help the problem, but I don't know how. I then tried to learn and write a plugin to pause/mute and wait for a short time (for ReplayGain to be applied) then start to play, as a workaround:
With this script, the issue is sort of "suppressed" for some format (like .mp3), while some formats will have no output and stay mute for another few seconds (about 0.1 second for .wma and >10 seconds for some .ape files). And all the threading, (repeated) mute/pause/sleep/seek on
After all my attempts, I think maybe this issue happens because "ReplayGain" is applied by a second thread?
Besides, "Fall-back gain" has no effect, therefore I think the recognition of "ReplayGain" is fast but applying is slow. Also, my loud songs need about -10 dB ReplayGain, so just setting "Pre-amp gain" to max (+6 dB) would help, however, if the "Pre-amp gain" could be set to +10 dB then this method would be even better in my case.