mirror of
https://github.com/beetbox/beets.git
synced 2025-12-29 20:12:33 +01:00
explicitly cast g1, g2, and peak to int in _sc_encode
They seem to have been implicitly forced to int via `%X` format, but with python 3.5 we must make it explicit.
This commit is contained in:
parent
77a869d290
commit
890102e114
1 changed files with 3 additions and 3 deletions
|
|
@ -269,14 +269,14 @@ def _sc_encode(gain, peak):
|
|||
# from the gain ratio using a reference value of 1000 units. We also
|
||||
# enforce the maximum value here, which is equivalent to about
|
||||
# -18.2dB.
|
||||
g1 = min(round((10 ** (gain / -10)) * 1000), 65534)
|
||||
g1 = int(min(round((10 ** (gain / -10)) * 1000), 65534))
|
||||
# Same as above, except our reference level is 2500 units.
|
||||
g2 = min(round((10 ** (gain / -10)) * 2500), 65534)
|
||||
g2 = int(min(round((10 ** (gain / -10)) * 2500), 65534))
|
||||
|
||||
# The purpose of these values are unknown, but they also seem to be
|
||||
# unused so we just use zero.
|
||||
uk = 0
|
||||
values = (g1, g1, g2, g2, uk, uk, peak, peak, uk, uk)
|
||||
values = (g1, g1, g2, g2, uk, uk, int(peak), int(peak), uk, uk)
|
||||
return (u' %08X' * 10) % values
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue