You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently stuck on having to extend AudioWorkletProcessor for the sake of overriding the process() function. And I'm also not yet sure if it's going to be possible to access AudioWorkletGlobalScope. On top of all this, I have no idea if it will play well with webpack / or any other bundler. This is what I've got so far:
use wasm_bindgen::prelude::*;
use web_sys::{ AudioWorkletGlobalScope };
#[wasm_bindgen]
pub fn create_worklet_node() {
AudioWorkletGlobalScope::register_processor(/* MISSING ARGUMENTS */);
}
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen(extends = web_sys::AudioWorkletProcessor)]
type MyAudioWorkletProcessor;
}
#[wasm_bindgen]
impl MyAudioWorkletProcessor {
pub fn process() {
// this would throw an error if I was doing it right... :/
}
}
Potential Incentive
I think that multi-threaded audio processing is an extremely good example of the power of wasm, so I'd probably not be the only person who could really use an example of how to set up an AudioWorklet using Rust.
Thanks for this project!
The text was updated successfully, but these errors were encountered:
Summary
I'd like to create and register an
AudioWorkletProcessor
using Rust. I'm still not sure if it's possible.Additional Details
I've also put up a question on StackOverflow.
I'm currently stuck on having to extend
AudioWorkletProcessor
for the sake of overriding theprocess()
function. And I'm also not yet sure if it's going to be possible to accessAudioWorkletGlobalScope
. On top of all this, I have no idea if it will play well with webpack / or any other bundler. This is what I've got so far:Potential Incentive
I think that multi-threaded audio processing is an extremely good example of the power of wasm, so I'd probably not be the only person who could really use an example of how to set up an AudioWorklet using Rust.
Thanks for this project!
The text was updated successfully, but these errors were encountered: