-
Notifications
You must be signed in to change notification settings - Fork 1
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
Compiler error on WebAssembly #1
Comments
Oh no, I may have published the wrong branch in crates.io. The I will try to yank that version and publish a new one. But for the time being, you can patch cpal in your [patch.crates-io]
# audio-engine 0.2.2 needs a unpublished version of cpal
cpal = { git = "https://github.com/RustAudio/cpal.git", rev = "b1457e5945cfeb136b7b04c8870b63c2ae3f2212" } |
Thanks for the answer and suggestion. But if this patch applied I still get the above compiler errors. |
I published a new version that should solve that error. But I think that the patch also should have solved the problem. Are you sure that the patch was being applied? It only works if it is put in the Workspace root or in the Cargo.toml of the crate being build (don't work if put in a dependency). You can confirm if it is being applied by running But in any case, the new version should solve this. Can you confirm if it works now? |
Yes, it compiles now. It was my error as you said, did not put the patch into the workspace. Ok, it compiles now! However I get a crash when I try to decode my wav file. I will try to narrow it down and also try different wav files. I embed my files use rust_embed. [Error] panicked at 'called Stack: @http://127.0.0.1:8080/client_standalone_web.js:331:30 wasm-stub@[native code]
|
I get the same error when I play natively on my Mac. Seems to be an unsupported audio sample format ? |
Yes, currently the wave decoder only supports decoding WAV files with a bit depth of 16 bits or lower (the entire audio engine uses i16). But the engine should at least convert the samples to i16 (and should not panic). I will close this issue as solved and open a new one for this. |
Opened #2 |
Is this engine capable to run under wasm32 ? Right now I get a compile error.
The text was updated successfully, but these errors were encountered: