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 #30

Open
duysqubix opened this issue Oct 10, 2023 · 0 comments
Open

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

duysqubix opened this issue Oct 10, 2023 · 0 comments

Comments

@duysqubix
Copy link
Contributor

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!

Original issue: faiface/beep#135

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