You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Thanks for the excellent package!
The text was updated successfully, but these errors were encountered:
JackMordaunt
changed the title
[tweak] expose beep.Buffer data to caller
[tweak] expose beep.Buffer.data data to caller
Oct 27, 2021
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!
The text was updated successfully, but these errors were encountered: