faiface / beep

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

Fix crash in resampler #152

Open erkkah opened 2 years ago

erkkah commented 2 years ago

I noticed that when using small buffers and rapidly changing ratio, the resampler tries to access samples outside of the old buffer buf1, causing a crash.

My solution is to simply use the oldest sample we have. Not sure if this is good enough, but works for me.