-
Notifications
You must be signed in to change notification settings - Fork 247
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
Support for webassembly builds? #313
Comments
Sure why not? cpal has wasm support too. |
This already works if you remove the mp3 feature: It also works if we use puremp3 as the mp3 decoder. I've tried this, and it seems okay but there are audible artifacts |
I had to modify the rodio
I tried the following in my project (using raw audio instead of decoders) and was able to get slightly mangled sound: let v = raw_data.to_vec();
let (_stream, stream_handle) = rodio::OutputStream::try_default().unwrap();
let buffer = SamplesBuffer::new(1,44100, v);
let sink = Sink::try_new(&stream_handle).unwrap();
sink.append(buffer);
sink.sleep_until_end(); However, I see the following error: According to this comment it's possible to use a |
I'm running into the same problem as #310. I am running rodio webassembly on the main thread, so I can't call What's strange to me is that |
It works if you use a OutputStream: https://github.com/glalonde/wasm_audio/blob/f01b022e5e9a0525f37f556367154aedf19c7dbc/src/lib.rs#L55 Also make sure you compile for release, because it's has choppy playback otherwise. |
Thanks @glalonde, the problem was that I was keeping a reference to the I am going to leave this issue open for now because there should be a |
I ran into an issue specific to Chrome where
This led me to the thought that |
Is there interest in supporting webassembly in
rodio
? I found theamethyst
fork that hasn't been maintained in several months and was interested in getting thewasm
branch back into a buildable state.One issue I found is that the
minimp3
project does not currently support wasm due to theslice_deque
dependency.The text was updated successfully, but these errors were encountered: