wasm experiments

unfortunately cpal doesn't support wasm/webaudio input devices https://github.com/RustAudio/cpal/issues/412
This commit is contained in:
Paul Sajna committed 2022-08-21 19:46:39 -07:00
1 parent 1e07dda1e6
commit 7594a90abb
2 files changed
+25 -1

No files matched your search

+14
View File
@@ -326,6 +326,16 @@ dependencies = [
"memchr",
]
[[package]]
name = "console_error_panic_hook"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"
dependencies = [
"cfg-if 1.0.0",
"wasm-bindgen",
]
[[package]]
name = "copyless"
version = "0.1.5"
@@ -454,6 +464,7 @@ dependencies = [
"parking_lot",
"stdweb",
"thiserror",
"wasm-bindgen",
"web-sys",
"winapi",
]
@@ -1867,9 +1878,12 @@ checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e"
name = "storyteller-vc"
version = "0.1.0"
dependencies = [
"console_error_panic_hook",
"cpal",
"iced",
"ringbuf",
"wasm-bindgen",
"web-sys",
]
[[package]]
+11 -1
View File
@@ -6,8 +6,18 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
cpal = "0.13.5"
iced = "0.4.2"
ringbuf = "0.2.8"
[target.'cfg(target_arch = "wasm32")'.dependencies]
cpal = { version = "0.13.5", features=["wasm-bindgen"] }
wasm-bindgen = "0.2.45"
web-sys = { version = "0.3.22", features=["console"] }
console_error_panic_hook = "0.1.5"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
cpal = "0.13.5"
[workspace]