use std::{cell::RefCell, collections::HashMap};
#[cfg(target_arch = "wasm32")]
pub struct Context {
pub audio: web_sys::AudioContext,
}
#[cfg(target_arch = "wasm32")]
impl Context {
pub fn new() -> Self {
let audio = web_sys::AudioContext::new()
.expect("failed to create audio context");
Self {
audio,
}
}
}
#[cfg(target_arch = "wasm32")]
pub struct Audio {
pub buffer: &'static RefCell