Closed siefkenj closed 3 years ago
In this WIP pull request, I started implementing something similar: #6
The way I did it, was to dump the data of a short wav file to a binary file, and then open it with rust (the scalar type and sample rate must be known, they are not part of the file).
This approach is very basic, but the reason why I did it this way (at least for now), was to avoid adding dependencies that might break the wasm target, as you also suspected.
If you would like to improve on it, I'll more than welcome a PR :)
Fixed by #14
I notice the tests currently use auto-generated samples. I would be nice if there were some real audio samples included in the tests.
I could try and do this, but I have a few questions:
tests
is the right place for them?wav
files. Does cargo make a distinction between crates needed to run tests and other crates? Am I going to bloat the executable and break WASM support if I add a crate for the tests?