Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tweak] expose beep.Buffer.data data to caller #135

Open
JackMordaunt opened this issue Oct 27, 2021 · 0 comments
Open

[tweak] expose beep.Buffer.data data to caller #135

JackMordaunt opened this issue Oct 27, 2021 · 0 comments

Comments

@JackMordaunt
Copy link

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!

@JackMordaunt JackMordaunt changed the title [tweak] expose beep.Buffer data to caller [tweak] expose beep.Buffer.data data to caller Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant