gopxl / beep

A little package that brings sound to any Go application. Suitable for playback and audio-processing.
MIT License
295 stars 15 forks source link

Rewrite resampler #166

Closed MarkKremer closed 4 months ago

MarkKremer commented 4 months ago

Fix for https://github.com/gopxl/beep/issues/20

Rewritten the Resampler to make the code easier to read & fix some bugs:

I've added a fuzz test to confirm weird resample ratios don't cause panics anymore.

It seems that the doppler example is now easier to crash. But the Doppler streamer is experimental and was giving the resampler invalid ratios. It probably needs a rewrite as well, but that something for another day.