gen2brain / malgo

Mini audio library
The Unlicense
288 stars 49 forks source link

playback example: fix a bug where audio is choppy #9

Closed rgeorgiev583 closed 5 years ago

rgeorgiev583 commented 5 years ago

Fix a bug where audio is choppy because the samples buffer passed to the onSendSamples callback is not being filled completely. For this purpose, the io.ReadFull wrapper function was used as it blocks until there is enough data to fill the whole buffer (which mp3.(*Decoder).Read doesn't seem to be doing).

gen2brain commented 5 years ago

Great, thanks!