I'm using beep to play audio that I have already decoded into PCM s16le as a []byte.
AFAIK the beep API forces me to then wrap that slice in a streamer and append it to a beep.Buffer. However, I would prefer to just shove my byte slice onto the data field on the beep.Buffer - since it's already correctly formatted.
Opening up this fields by making it public or by introducing a second constructor would be strictly backwards compatible, and trivial to do.
Thoughts on this? Perhaps I'm misunderstanding the existing API.
In the meantime I have copied the type in it's entirety to achieve this, which does work but isn't ideal.
I'm using beep to play audio that I have already decoded into PCM s16le as a
[]byte
.AFAIK the beep API forces me to then wrap that slice in a streamer and append it to a
beep.Buffer
. However, I would prefer to just shove my byte slice onto thedata
field on thebeep.Buffer
- since it's already correctly formatted.Opening up this fields by making it public or by introducing a second constructor would be strictly backwards compatible, and trivial to do.
Thoughts on this? Perhaps I'm misunderstanding the existing API.
In the meantime I have copied the type in it's entirety to achieve this, which does work but isn't ideal.
Thanks for the excellent package!