staniel359 / muffon

Advanced multi-source music streaming + discovery client for desktop. Free, clean, no login, no ads.
https://muffon.netlify.app
GNU Affero General Public License v3.0
1.18k stars 49 forks source link

Bitrate bug fix #143

Closed xyloflake closed 5 months ago

xyloflake commented 5 months ago

For the discord issue originally reported by @gamersi

xyloflake commented 5 months ago

Even if this doesn't fix the bug, Math.round is inaccurate with f64 numbers and it's not good practice to use it. You could get a -0 with Math.round()

In short, Math.round has uneven f64 distribution as mentioned in the SO post below.

Check out Why is Math.floor() preferred over Math.round()?

staniel359 commented 5 months ago

@xyloflake Have you tested it with the original audio? https://cdn.discordapp.com/attachments/1174453596218196038/1196055400252977182/image.png?ex=65b63c65&is=65a3c765&hm=8eb8ca9e3afb0caf7b57855e849e50ebf1b827d2b8f8293fdab128f719780fe8&