Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Reintroduce `audio_thread_priority` feature.
- **Emscripten**: Fix build failure introduced by newer `wasm-bindgen` versions.

## [0.17.3] - 2026-02-18

Expand Down
6 changes: 4 additions & 2 deletions src/host/emscripten/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//! Default backend on Emscripten.

use js_sys::Float32Array;
use std::panic::AssertUnwindSafe;
use std::time::Duration;
use wasm_bindgen::prelude::*;
use wasm_bindgen::JsCast;
Expand Down Expand Up @@ -233,6 +234,7 @@ impl DeviceTrait for Device {
//
// See also: The call to `set_timeout` at the end of the `audio_callback_fn` which creates
// the loop.
let data_callback = AssertUnwindSafe(data_callback);
set_timeout(
10,
stream.clone(),
Expand Down Expand Up @@ -279,7 +281,7 @@ impl StreamTrait for Stream {
}

fn audio_callback_fn<D>(
mut data_callback: D,
mut data_callback: AssertUnwindSafe<D>,
) -> impl FnOnce(Stream, StreamConfig, SampleFormat, u32)
where
D: FnMut(&mut Data, &OutputCallbackInfo) + Send + 'static,
Expand Down Expand Up @@ -361,7 +363,7 @@ where
fn set_timeout<D>(
time: i32,
stream: Stream,
data_callback: D,
data_callback: AssertUnwindSafe<D>,
config: &StreamConfig,
sample_format: SampleFormat,
buffer_size_frames: u32,
Expand Down