deltabeard / MiniGBS

Small .gbs chiptune player for Linux and Windows
MIT License
3 stars 0 forks source link

Remove Floating Point Arithmetic #14

Open deltabeard opened 5 years ago

deltabeard commented 5 years ago

I want to support the ESP32 platform, which does use a Floating Point Unit (FPU), but it's very slow. It would be beneficial to therefore replace with integer arithmetic, for embedded systems with no or poor FPUs.

It would not make sense for floating point arithmetic to remain as an alternative, as integer arithmetic will be the same speed or faster on all platforms as far as I know (unless the audio driver wants samples in float format).

deltabeard commented 5 years ago

Probably won't be possible (within reason) to remove all floating point arithmetic, but if any unnecessary use of floats could be changed, that would be good enough.

clort81 commented 2 years ago

I didn't want to create an issue just to say thank you! This is very interesting to me (designing my own effects and music for a little game project). This is still an order of magnitude more complex than what I've written (square/pulse waves to alsa) but it is very helpful for me to study. Thanks again!