ardaku / wavy

Asynchronous cross-platform real-time audio recording & playback.
https://docs.rs/crate/wavy/latest
Apache License 2.0
84 stars 4 forks source link

Record in the browser panics #26

Closed fgadaleta closed 3 years ago

fgadaleta commented 3 years ago

Compiled the Record example for wasm and upon execution, it returns

panicked at 'called `Result::unwrap()` on an `Err` value: JsValue(IndexSizeError: BaseAudioContext.createScriptProcessor: 64 is not a valid bufferSize
init/imports.wbg.__wbg_createScriptProcessor_4b76206bc3949bda<@http://localhost:8000/gen/record.js:368:35
handleError/<@http://localhost:8000/gen/record.js:240:22
@http://localhost:8000/gen/record_bg.wasm:wasm-function[124]:0x80a3
@http://localhost:8000/gen/record_bg.wasm:wasm-function[59]:0x543f
@http://localhost:8000/gen/record_bg.wasm:wasm-function[54]:0x4bd8
@http://localhost:8000/gen/record_bg.wasm:wasm-function[125]:0x80f1
@http://localhost:8000/gen/record_bg.wasm:wasm-function[238]:0x90fc
wasm_start_main@http://localhost:8000/gen/record.js:234:10
@http://localhost:8000/:9:13
promise callback*@http://localhost:8000/:8:16
)', /home/frag/.cargo/registry/src/github.com-1ecc6299db9ec823/wavy-0.9.0/src/ffi/wasm/ffi.rs:75:18

Stack:

init/imports.wbg.__wbg_new_59cb74e423758ede@http://localhost:8000/gen/record.js:300:19
@http://localhost:8000/gen/record_bg.wasm:wasm-function[49]:0x433e
@http://localhost:8000/gen/record_bg.wasm:wasm-function[237]:0x90f7
@http://localhost:8000/gen/record_bg.wasm:wasm-function[79]:0x6b4e
@http://localhost:8000/gen/record_bg.wasm:wasm-function[96]:0x757a
@http://localhost:8000/gen/record_bg.wasm:wasm-function[162]:0x8a08
@http://localhost:8000/gen/record_bg.wasm:wasm-function[145]:0x8702
@http://localhost:8000/gen/record_bg.wasm:wasm-function[163]:0x8a3d
@http://localhost:8000/gen/record_bg.wasm:wasm-function[102]:0x789d
@http://localhost:8000/gen/record_bg.wasm:wasm-function[59]:0x5540
@http://localhost:8000/gen/record_bg.wasm:wasm-function[54]:0x4bd8
@http://localhost:8000/gen/record_bg.wasm:wasm-function[125]:0x80f1
@http://localhost:8000/gen/record_bg.wasm:wasm-function[238]:0x90fc
wasm_start_main@http://localhost:8000/gen/record.js:234:10
@http://localhost:8000/:9:13
promise callback*@http://localhost:8000/:8:16
AldaronLau commented 3 years ago

@fgadaleta Thanks, I'll look into this and hopefully fix it and release a patch this weekend.

fgadaleta commented 3 years ago

awesome thanks! FYI i am following the build as here

AldaronLau commented 3 years ago

This should be fixed in wavy 0.9.1, so closing (@fgadaleta re-open if I'm wrong).