1
0
mirror of https://github.com/fluencelabs/wasm-bindgen synced 2025-07-12 19:11:32 +00:00

examples(webaudio): allow turning the noise off again

This commit is contained in:
Nick Fitzgerald
2018-09-26 10:37:12 -07:00
parent a3e160744e
commit 826619870f
3 changed files with 10 additions and 1 deletions
examples/webaudio

@ -36,6 +36,12 @@ pub struct FmOsc {
fm_gain_ratio: f32,
}
impl Drop for FmOsc {
fn drop(&mut self) {
let _ = self.ctx.close();
}
}
#[wasm_bindgen]
impl FmOsc {
#[wasm_bindgen(constructor)]