lordmauve / wasabi2d

Cutting-edge 2D game framework for Python
https://wasabi2d.readthedocs.io/
GNU Lesser General Public License v3.0
154 stars 24 forks source link

tone: Round lengths to integer number of samples #60

Closed encukou closed 3 years ago

encukou commented 3 years ago

I was hit by https://github.com/lordmauve/wasabi2d/issues/57, and I think this is the right way to solve it.

lordmauve commented 3 years ago

Two of those cases use floor division. I guess they should be changed to true division if they're being rounded afterwards?

encukou commented 3 years ago

Oops, I missed those extra slashes!

Since hz might not be an integer, round works better than floor division.

lordmauve commented 3 years ago

Thank you!