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

vvvrrooomm
Copy link
Contributor

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))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

@vvvrrooomm vvvrrooomm Aug 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

darn. Of course, I forgot to delte that

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

sampsyo commented Aug 20, 2018

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants