Closed FuzzyStatic closed 5 years ago
I have a similar issue. I start playing an audio stream, then after a while play a different audio stream. The playback makes weird glitchy noises and then all audio stops.
That's because you call speaker.Init
every time you play something, which resets the speaker. speaker.Init
should only be called once at the beginning of your program.
Sorry for the really late response.
TY! This fixed my issue!
This a question on how to implement beep so that each new audio play does not overwrite the previous one. I tried to figure it out through the documentation but my ignorance on how audio works has brought me to a roadblock.
I have a game I've been writing here, https://github.com/FuzzyStatic/shape-wars, and I've been using the example you have in the README (https://github.com/FuzzyStatic/shape-wars/blob/master/audio.go). It seems any time I play a new audio file the previous audio stops or goes silent.
Any information you can give me is greatly appreciated!