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 2 commits into from Apr 15, 2018


Copy link

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
continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.

Copy link

lazka commented Apr 15, 2018


@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
None yet
2 participants
You can’t perform that action at this time.