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

Small fix to peak amplitude decoding #345

Merged
merged 2 commits into from Apr 15, 2018
Merged

Conversation

@citrin
Copy link
Contributor

citrin commented Apr 14, 2018

No description provided.

citrin added 2 commits Apr 14, 2018
Lame encodes the value as:
abs((int) ((((FLOAT) gfc->ov_rpg.PeakSample) / 32767.0) * pow(2, 23) + .5))

(int)(float_num + 0.5) is just an easy way to round number to the
nearest integer. There is no need to subtract 0.5 while decoding. Doing
so will add an error (though very small).
@lazka lazka merged commit 251991f into quodlibet:master Apr 15, 2018
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@lazka

This comment has been minimized.

Copy link
Member

lazka commented Apr 15, 2018

Thanks!

@citrin citrin deleted the citrin:replaygain-nitpick branch Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.