lordmauve / wasabi2d

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

tone: Round lengths to integer number of samples #60

Closed encukou closed 4 years ago

encukou commented 4 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 4 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 4 years ago

Oops, I missed those extra slashes!

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

lordmauve commented 4 years ago

Thank you!