Open ratzupaltuff opened 3 weeks ago
It fails in this section in the Write(buffer) method:
(Part of the library code)
ret := C.snd_pcm_writei(p.h, bufPtr, frames)
if ret == -C.EPIPE { // this returns true every second time calling the method
C.snd_pcm_prepare(p.h) // this probably fixes the playback for the third call
return 0, ErrUnderrun
Hi, thanks for your great library! Unfortunately I am unable to play audio every second time I call the Write method. It plays fine the first time and fails with an underrun every second time. When adjusting the Buffer properties nothing changes.
My code:
If I run PlayBeep(100*time.Millisecond) it works the first time and fails the second time. The same is true if I generate longer sine wave beeps. What can I do to fix this problem or at least debug it further? Thanks a lot!