Is there a smart way to play overlapping sounds?
szymonnedzi opened this issue · 1 comments
szymonnedzi commented
I'm developing an application that plays overlapping .wav files, and I want to be able to mute/unmute or pause/start a specific one on a specific input. Should I load the files into the same beep.Streamer
and load it into one beep.Speaker
or into the same beep.Buffer
and then into a beep.Speaker
or approach it in a different way? What's the 'correct' way to do so?
MarkKremer commented
If you want to mute/pause specific sounds independently it's not useful to put them into the same beep.Buffer
.
I would keep it simple by letting the speaker do the merging:
wav 1 -> buffer -> mute/pause
|
v
speaker
^
|
wav 2 -> buffer -> mute/pause
The buffer alleviates the pressure on the speakers internal buffer a bit but I'm not certain it is required.