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

replaygain: albumpeak on large collections is calculated as average,not maximum (bug 3008) #3009

Merged
merged 2 commits into from Aug 20, 2018

Conversation

Projects
None yet
2 participants
@vvvrrooomm
Copy link
Contributor

commented Aug 20, 2018

this fixes the first half of #3008 - the peak calculation,
calculating the albumgain is still wrong

@@ -181,7 +181,7 @@ def compute_gain(self, items, is_album):
i += 1
returnchunk = self.compute_chunk_gain(chunk, is_album)
albumgaintot += returnchunk[-1].gain
albumpeaktot += returnchunk[-1].peak
albumpeaktot = max(albumpeaktot, returnchunk[-1].peak)
returnchunks = returnchunks + returnchunk[0:-1]
returnchunks.append(Gain(albumgaintot / i, albumpeaktot / i))

This comment has been minimized.

Copy link
@sampsyo

sampsyo Aug 20, 2018

Member

To compute a maximum, this last / i should be deleted, right?

This comment has been minimized.

Copy link
@vvvrrooomm

vvvrrooomm Aug 20, 2018

Author Contributor

darn. Of course, I forgot to delte that

@sampsyo sampsyo merged commit c5c352e into beetbox:master Aug 20, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sampsyo

This comment has been minimized.

Copy link
Member

commented Aug 20, 2018

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.