You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**WASM (`audioworklet`):** Rust **nightly** (requires `-Zbuild-std` for atomics support)
20
21
21
22
## Supported Platforms
@@ -29,17 +30,20 @@ This library currently supports the following:
29
30
- Get the current default input and output stream formats for a device.
30
31
- Build and run input and output PCM streams on a chosen device with a given stream format.
31
32
32
-
Currently, supported hosts include:
33
+
Currently, supported platforms include:
33
34
34
-
- Linux (via ALSA or JACK)
35
-
- Windows (via WASAPI by default, ASIO or JACK optionally)
36
-
- macOS (via CoreAudio or JACK)
37
-
- iOS (via CoreAudio)
38
35
- Android (via AAudio)
36
+
- BSD (via ALSA by default, JACK or PulseAudio optionally)
39
37
- Emscripten
38
+
- iOS (via CoreAudio)
39
+
- Linux (via ALSA by default, JACK or PulseAudio optionally)
40
+
- macOS (via CoreAudio by default, JACK optionally)
40
41
- WebAssembly (via Web Audio API or Audio Worklet)
42
+
- Windows (via WASAPI by default, ASIO or JACK optionally)
41
43
42
-
Note that on Linux, the ALSA development files are required for building (even when using JACK). These are provided as part of the `libasound2-dev` package on Debian and Ubuntu distributions and `alsa-lib-devel` on Fedora.
44
+
Note that on Linux, the ALSA development files are required for building (even when using JACK or
45
+
PulseAudio). These are provided as part of the `libasound2-dev` package on Debian and Ubuntu
Enables the Audio Worklet backend for lower-latency web audio processing compared to the default Web Audio API backend.
73
+
74
+
**Requirements:**
75
+
- The `wasm-bindgen` feature (automatically enabled)
76
+
- Build with atomics support: `RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals"`
77
+
- Web server must send Cross-Origin headers for SharedArrayBuffer support
78
+
79
+
**Setup:** See the `audioworklet-beep` example README for complete setup instructions.
80
+
81
+
**Note:** Audio Worklet provides better performance than the default Web Audio API by running audio processing on a separate thread.
82
+
83
+
### `custom`
84
+
85
+
**Platform:** All platforms
86
+
87
+
Enables support for user-defined custom host implementations, allowing integration with audio systems not natively supported by CPAL.
88
+
89
+
**Usage:** See `examples/custom.rs` for implementation details.
90
+
64
91
### `jack`
65
92
66
93
**Platform:** Linux, DragonFly BSD, FreeBSD, NetBSD, macOS, Windows
@@ -74,40 +101,28 @@ Enables the JACK (JACK Audio Connection Kit) backend. JACK is an audio server pr
74
101
75
102
**Note:** JACK is available as an alternative backend on all supported platforms. It provides an option for pro-audio users who need JACK's routing and inter-application audio connectivity. The native backends (ALSA for Linux/BSD, WASAPI/ASIO for Windows, CoreAudio for macOS) remain the default and recommended choice for most applications.
0 commit comments