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

feature request: add to wav package functions and types to directly work with wav header #118

Open
ilyapashuk opened this issue Apr 4, 2021 · 2 comments

Comments

@ilyapashuk
Copy link
Contributor

hello.

please add to wav package functions and types to parse and generate wav file headers directly, without decoding other data.

this can be very usefull for internet streamming when we need to send header to each new client and then start to transmit raw data from some source

@MarkKremer
Copy link
Contributor

WAV's header contains a filesize. For streaming audio the size isn't known so this wouldn't work.

What you could do is use the functions on the Format struct to encode audio samples manually. You just have to make sure that the client and server agree on the format by either hardcoding it or sending your own custom header. You can use the wav encoding/decoding implementation for an example on how to use Format.

Normally a more compact format is used to stream audio like mp3 (I think). But beep can't encode that so yeah...

@ilyapashuk
Copy link
Contributor Author

for example, when size of the data is not known, sox sets it to 0 and is able to understand this.

please simply add type, parsing and writing functions for wav header without direct bound to Format type.

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

2 participants