diff --git a/CHANGELOG.md b/CHANGELOG.md index 54e6def03..655c43a73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `StreamTrait::stop` ends a stream gracefully, draining buffered audio before halting (blocking up to a caller-supplied timeout). Dropping a stream still halts immediately without draining. - `CallbackInfo::xrun()` reports buffer over/underruns via the data callback. +- **AudioWorklet**: Input streams are now supported. +- **WebAudio**: Input streams are now supported. ### Changed @@ -35,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - **ALSA**: Fix a remaining timestamp segfault on 32-bit platforms with a 64-bit kernel `time_t`. +- **AudioWorklet**: Fix processor construction failures not being reported to `error_callback`. ## [Unreleased] (v0.18.2) diff --git a/Cargo.toml b/Cargo.toml index 5afca71b4..6e2520f13 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,6 +46,8 @@ audioworklet = [ "web-sys/AudioWorklet", "web-sys/AudioWorkletNode", "web-sys/AudioWorkletNodeOptions", + "web-sys/ChannelCountMode", + "web-sys/Event", ] # Support for user-defined custom hosts, devices, and streams @@ -87,6 +89,16 @@ wasm-bindgen = [ "dep:wasm-bindgen-futures", "dep:futures-channel", "dep:futures-util", + "web-sys/Navigator", + "web-sys/MediaDevices", + "web-sys/MediaStream", + "web-sys/MediaStreamConstraints", + "web-sys/MediaStreamTrack", + "web-sys/MediaStreamAudioSourceNode", + "web-sys/ScriptProcessorNode", + "web-sys/AudioProcessingEvent", + "web-sys/GainNode", + "web-sys/AudioParam", ] [dependencies] diff --git a/examples/audioworklet-beep/.cargo/config.toml b/examples/audioworklet-beep/.cargo/config.toml index c6df64da1..5eccee0f8 100644 --- a/examples/audioworklet-beep/.cargo/config.toml +++ b/examples/audioworklet-beep/.cargo/config.toml @@ -16,6 +16,8 @@ rustflags = [ "link-arg=--export=__tls_align", "-C", "link-arg=--export=__tls_base", + "-C", + "link-arg=--export=__heap_base", ] [unstable] diff --git a/examples/audioworklet-beep/Cargo.toml b/examples/audioworklet-beep/Cargo.toml index e7afd3039..ebf6bc2ec 100644 --- a/examples/audioworklet-beep/Cargo.toml +++ b/examples/audioworklet-beep/Cargo.toml @@ -27,6 +27,9 @@ wasm-bindgen = "0.2" # logging them with `console.error`. console_error_panic_hook = "0.1" +# The `ringbuf` crate provides a lock-free ring buffer for passing audio between streams. +ringbuf = "0.4" + # The `web-sys` crate allows you to interact with the various browser APIs, # like the DOM. [dependencies.web-sys] diff --git a/examples/audioworklet-beep/index.html b/examples/audioworklet-beep/index.html index 6a748f05b..6e3139fc6 100644 --- a/examples/audioworklet-beep/index.html +++ b/examples/audioworklet-beep/index.html @@ -9,6 +9,9 @@
+ + +Recording plays your microphone back live. Wear headphones to avoid feedback howl.