Skip to content

Releases: RustAudio/cpal

cpal 0.17.0

20 Dec 19:18
4b8c6c3

Choose a tag to compare

Added

  • DeviceTrait::id method that returns a stable audio device ID.
  • HostTrait::device_by_id to select a device by its stable ID.
  • Display and FromStr implementations for HostId.
  • Support for custom Hosts, Devices, and Streams.
  • Sample::bits_per_sample method.
  • Copy implementation to InputCallbackInfo and OutputCallbackInfo.
  • StreamError::StreamInvalidated variant for when stream must be rebuilt.
  • StreamError::BufferUnderrun variant for buffer underrun/overrun notifications.
  • Hash implementation to Device for all backends.
  • AAudio: Send and Sync implementations to Stream.
  • AAudio: Support for 12 and 24 kHz sample rates.
  • ALSA: I24 and U24 sample format support (24-bit samples stored in 4 bytes).
  • ALSA: Support for 12, 24, 352.8, 384, 705.6, and 768 kHz sample rates.
  • ALSA: Eq and PartialEq implementations to Device.
  • CI: Native ARM64 Linux support in GitHub Actions.
  • CoreAudio: i8, i32 and I24 sample format support (24-bit samples stored in 4 bytes).
  • CoreAudio: Support for loopback recording (recording system audio output) on macOS > 14.6.
  • CoreAudio: Send implementation to Stream.
  • Emscripten: BufferSize::Fixed validation against supported range.
  • iOS: Complete AVAudioSession integration for device enumeration and buffer size control.
  • JACK: Support for macOS and Windows platforms.
  • JACK: BufferSize::Fixed validation to reject requests that don't match server buffer size.
  • WASAPI: Expose IMMDevice from WASAPI host Device.
  • WASAPI: I24 and U24 sample format support (24-bit samples stored in 4 bytes).
  • WASAPI: Send and Sync implementations to Stream.
  • WebAudio: Send and Sync implementations to Stream.
  • WebAudio: BufferSize::Fixed validation against supported range.

Changed

  • MSRV depends on the platform and at minimum 1.77.
  • Set examples to Rust 2021.
  • SampleRate from struct to u32 type alias.
  • Update audio_thread_priority to 0.34.
  • Migrate CHANGELOG to Keep a Changelog format.
  • AAudio: Configure buffer to ensure consistent callback buffer sizes.
  • AAudio: Buffer size range detection to query the AudioService property correctly.
  • ALSA: Improve BufferSize::Fixed precision and audio callback performance.
  • ALSA: BufferSize::Default to use the device defaults.
  • ALSA: Card enumeration to work like aplay -L does.
  • ALSA: Update alsa to 0.10.
  • ALSA: Pass silent=true to PCM.try_recover, so it doesn't write to stderr.
  • ALSA: Report buffer underruns/overruns via StreamError::BufferUnderrun.
  • ASIO: Share sys::Asio instance across all Host instances.
  • CI: Fix cargo publish to trigger on GitHub releases instead of every master commit.
  • CI: Replace cargo install commands with cached tool installation for faster builds.
  • CI: Update actions to latest versions (checkout@v5, rust-cache@v2).
  • CI: Verify compatibility with windows crates since v0.59.
  • CI: Test platforms on appropriate MSRV per backend.
  • CI: Fix cargo update syntax for compatibility with Cargo 1.70 (use -p flag instead of positional argument).
  • CoreAudio: Device::supported_configs to return a single element containing the available sample rate range when all elements have the same mMinimum and mMaximum values.
  • CoreAudio: Default audio device detection to be lazy when building a stream, instead of during device enumeration.
  • CoreAudio: Configure device buffer to ensure predictable callback buffer sizes.
  • CoreAudio: Remove Clone implementation from Stream.
  • JACK: Use StreamError::StreamInvalidated for JACK server sample rate changes.
  • JACK: Report buffer underruns/overruns via StreamError::BufferUnderrun.
  • WASAPI: Update windows to >= 0.59, <= 0.62.

Fixed

  • ALSA: Format selection to probe hardware endianness instead of assuming native byte order.
  • ALSA: Data race in stream shutdown.
  • ASIO: Handling for kAsioResetRequest message to prevent driver UI becoming unresponsive.
  • ASIO: Buffer silencing logic to work with non-conformant drivers (e.g., FL Studio ASIO).
  • CoreAudio: Timestamp accuracy.
  • CoreAudio: Segfaults when enumerating devices.
  • CoreAudio: Undefined behavior related to null pointers and aligned reads.
  • CoreAudio: Unnecessary microphone permission requests when using output devices only.
  • iOS: Example by properly activating audio session.

Removed

  • WebAudio: Optional wee-alloc feature for security reasons.

asio-sys 0.2.4

20 Dec 19:01
e394d6c

Choose a tag to compare

Fixed

  • Fixed docs.rs documentation build by generating stub bindings when building for docs.rs
  • Fixed buffer switch detection to work correctly with non-conformant ASIO drivers

asio-sys 0.2.3

12 Dec 10:16
5236586

Choose a tag to compare

Added

  • Added edition = "2021" and rust-version = "1.70" to Cargo.toml
  • Added README.md with usage documentation
  • Added CHANGELOG.md following Keep a Changelog format
  • Added rustfmt.toml for consistent formatting

Changed

  • Update bindgen to 0.72
  • Update cc to 1.2
  • Update parse_cfg to 4.1
  • Update enumerate example to use pub type SampleRate = u32 instead of pub struct SampleRate(pub u32) for consistency with cpal

Fixed

  • Fix linker flags for MinGW cross-compilation
  • Add packed(4) to representation of ASIO time structs in bindings
  • Fix handling for kAsioResetRequest message to prevent driver UI becoming unresponsive
  • Fix timeinfo flags type

cpal 0.16.0

11 Dec 16:52
v0.16.0
98918e4

Choose a tag to compare

Added

  • Optional supports_input/output methods to DeviceTrait.
  • 384000Hz to COMMON_SAMPLE_RATES.
  • Constructors for InputCallbackInfo, OutputCallbackInfo and StreamInstant.
  • Default impl for Host.
  • PartialOrd, Ord and Hash implementations for SampleFormat.
  • Clone, PartialEq, Eq and Hash implementations for all error enums.
  • ASIO: Support for int24.

Changed

  • AAudio: Migrate from oboe to ndk::audio. NOTE: This raises the minimum Android API version to 26 (Android 8/Oreo).
  • AAudio: Improve device names.
  • ALSA: Set realtime priority for stream threads.
  • ALSA: Improved card enumeration.
  • CoreAudio: Update coreaudio-rs dependency to 0.13.
  • JACK: Update jack dependency to 0.13.
  • WASAPI: Set realtime priority for stream threads.

Fixed

  • ALSA: Don't panic when handling invalid stream timestamps.
  • ALSA: Fix infinite loop on broken pipes.
  • ASIO: Fix build failure on Windows.
  • CoreAudio: Fix callback being called after dropping the stream.
  • CoreAudio: Fix non-default audio output.
  • CoreAudio: Fix handling of integer input formats.
  • WASAPI: Fixed memory leak.
  • WASAPI: Remove usage of eval.

cpal 0.15.3

11 Dec 16:52
v0.15.3
7b21251

Choose a tag to compare

Added

  • try_with_sample_rate, a non-panicking variant of with_sample_rate.
  • #[must_use] attribute to struct platform::Stream.
  • Copy implementation to enum SupportedBufferSize and struct SupportedStreamConfigRange.
  • Clone implementation to platform::Device.

Changed

  • AAudio: Update jni dependency to 0.21.
  • AAudio: Update oboe dependency to 0.6.
  • AAudio: Update ndk dependency to 0.8 and disable default-features.
  • ALSA: Update alsa dependency to 0.9.
  • CI: Update actions, use Android 30 API level in CI, remove asmjs-unknown-emscripten target.
  • Examples: Migrate wasm example to trunk, improve syth-thones example.
  • WASAPI: Update windows dependency to v0.54.
  • WebAudio: Update wasm-bindgen to 0.2.89.

Fixed

  • WebAudio: Crash on web/wasm when atomics flag is enabled.

Removed

  • parking_lot dependency in favor of the std library.

cpal 0.15.2

11 Dec 16:52
v0.15.2
2cae7b4

Choose a tag to compare

Added

  • WebAudio: Support for multichannel output streams.

Changed

  • WASAPI: Update windows dependency.

Fixed

  • WASAPI: Fix some thread panics.

cpal 0.15.1

11 Dec 16:52
v0.15.1

Choose a tag to compare

Added

  • AAudio: Feature oboe-shared-stdcxx to enable shared-stdcxx on oboe for Android support.

Changed

  • CoreAudio: Switch mach dependency to mach2.

Removed

  • thiserror dependency.

cpal 0.15.0

11 Dec 16:52
v0.15.0

Choose a tag to compare

Added

  • CoreAudio: Disconnection detection on Mac OS.

Changed

  • Switch to the dasp_sample crate for the sample trait.
  • Adopt edition 2021.
  • AAudio: Update oboe dependency.
  • AAudio: Update alsa dependency.
  • CoreAudio: Update coreaudio-sys dependency.
  • Emscripten: Switch to web-sys on the emscripten target.
  • JACK: Update jack dependency.
  • WASAPI: Update windows-rs dependency.

cpal 0.14.2

11 Dec 16:52
v0.14.2
5c34a88

Choose a tag to compare

Removed

  • nix dependency.

cpal 0.14.1

11 Dec 16:52
v0.14.1

Choose a tag to compare

Added

  • ALSA: Support for the 0.6.1 release of alsa-rs.
  • NetBSD: Platform support.

Changed

  • CI: Various improvements.

Fixed

  • ASIO: Feature broken in 0.14.0.