faiface / beep

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

Small static noise is played every time a .wav sample is looped #14

Closed kendalharland closed 6 years ago

kendalharland commented 6 years ago

os: mac OSX go: 1.9.2 darwin/amd64

When looping a sound, each new loop begins with a tiny but noticeable static noise. To repro:

// init speaker, load sound... etc.
speaker.Play(beep.Loop(-1, sound))

For reference, the audio file I'm looping is here: https://drive.google.com/open?id=1xucV3r61huoVKA5NALsJs4k44-WwDEl6

faiface commented 6 years ago

Hi, thanks for reporting! Sorry I only respond now, there really was a bug, the WAV decoder streamed past the end of audio data if there were some bytes after the data section. That's fixed now, so it only streams as much as it should. It was a little tricky one to find, so thanks for reporting!

Tell me if it fixed it on your side, and if so, we can close this issue.

kendalharland commented 6 years ago

That did it! Thanks for fixing this.