Releases: RustAudio/cpal
Releases · RustAudio/cpal
cpal 0.17.0
Added
DeviceTrait::idmethod that returns a stable audio device ID.HostTrait::device_by_idto select a device by its stable ID.DisplayandFromStrimplementations forHostId.- Support for custom
Hosts,Devices, andStreams. Sample::bits_per_samplemethod.Copyimplementation toInputCallbackInfoandOutputCallbackInfo.StreamError::StreamInvalidatedvariant for when stream must be rebuilt.StreamError::BufferUnderrunvariant for buffer underrun/overrun notifications.Hashimplementation toDevicefor all backends.- AAudio:
SendandSyncimplementations toStream. - AAudio: Support for 12 and 24 kHz sample rates.
- ALSA:
I24andU24sample 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:
EqandPartialEqimplementations toDevice. - CI: Native ARM64 Linux support in GitHub Actions.
- CoreAudio:
i8,i32andI24sample format support (24-bit samples stored in 4 bytes). - CoreAudio: Support for loopback recording (recording system audio output) on macOS > 14.6.
- CoreAudio:
Sendimplementation toStream. - Emscripten:
BufferSize::Fixedvalidation against supported range. - iOS: Complete AVAudioSession integration for device enumeration and buffer size control.
- JACK: Support for macOS and Windows platforms.
- JACK:
BufferSize::Fixedvalidation to reject requests that don't match server buffer size. - WASAPI: Expose
IMMDevicefrom WASAPI host Device. - WASAPI:
I24andU24sample format support (24-bit samples stored in 4 bytes). - WASAPI:
SendandSyncimplementations toStream. - WebAudio:
SendandSyncimplementations toStream. - WebAudio:
BufferSize::Fixedvalidation against supported range.
Changed
- MSRV depends on the platform and at minimum 1.77.
- Set examples to Rust 2021.
SampleRatefrom struct tou32type alias.- Update
audio_thread_priorityto 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::Fixedprecision and audio callback performance. - ALSA:
BufferSize::Defaultto use the device defaults. - ALSA: Card enumeration to work like
aplay -Ldoes. - ALSA: Update
alsato 0.10. - ALSA: Pass
silent=truetoPCM.try_recover, so it doesn't write to stderr. - ALSA: Report buffer underruns/overruns via
StreamError::BufferUnderrun. - ASIO: Share
sys::Asioinstance across allHostinstances. - 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 updatesyntax for compatibility with Cargo 1.70 (use-pflag instead of positional argument). - CoreAudio:
Device::supported_configsto return a single element containing the available sample rate range when all elements have the samemMinimumandmMaximumvalues. - 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
Cloneimplementation fromStream. - JACK: Use
StreamError::StreamInvalidatedfor JACK server sample rate changes. - JACK: Report buffer underruns/overruns via
StreamError::BufferUnderrun. - WASAPI: Update
windowsto >= 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
kAsioResetRequestmessage 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-allocfeature for security reasons.
asio-sys 0.2.4
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
Added
- Added
edition = "2021"andrust-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
bindgento 0.72 - Update
ccto 1.2 - Update
parse_cfgto 4.1 - Update enumerate example to use
pub type SampleRate = u32instead ofpub 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
kAsioResetRequestmessage to prevent driver UI becoming unresponsive - Fix timeinfo flags type
cpal 0.16.0
Added
- Optional
supports_input/outputmethods toDeviceTrait. - 384000Hz to
COMMON_SAMPLE_RATES. - Constructors for
InputCallbackInfo,OutputCallbackInfoandStreamInstant. Defaultimpl forHost.PartialOrd,OrdandHashimplementations forSampleFormat.Clone,PartialEq,EqandHashimplementations for all error enums.- ASIO: Support for int24.
Changed
- AAudio: Migrate from
oboetondk::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-rsdependency to 0.13. - JACK: Update
jackdependency 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
Added
try_with_sample_rate, a non-panicking variant ofwith_sample_rate.#[must_use]attribute to structplatform::Stream.Copyimplementation to enumSupportedBufferSizeand structSupportedStreamConfigRange.Cloneimplementation toplatform::Device.
Changed
- AAudio: Update
jnidependency to 0.21. - AAudio: Update
oboedependency to 0.6. - AAudio: Update
ndkdependency to 0.8 and disabledefault-features. - ALSA: Update
alsadependency to 0.9. - CI: Update actions, use Android 30 API level in CI, remove
asmjs-unknown-emscriptentarget. - Examples: Migrate wasm example to
trunk, improve syth-thones example. - WASAPI: Update
windowsdependency to v0.54. - WebAudio: Update
wasm-bindgento 0.2.89.
Fixed
- WebAudio: Crash on web/wasm when
atomicsflag is enabled.
Removed
parking_lotdependency in favor of the std library.
cpal 0.15.2
Added
- WebAudio: Support for multichannel output streams.
Changed
- WASAPI: Update
windowsdependency.
Fixed
- WASAPI: Fix some thread panics.
cpal 0.15.1
Added
- AAudio: Feature
oboe-shared-stdcxxto enableshared-stdcxxonoboefor Android support.
Changed
- CoreAudio: Switch
machdependency tomach2.
Removed
thiserrordependency.
cpal 0.15.0
Added
- CoreAudio: Disconnection detection on Mac OS.
Changed
- Switch to the
dasp_samplecrate for the sample trait. - Adopt edition 2021.
- AAudio: Update
oboedependency. - AAudio: Update
alsadependency. - CoreAudio: Update
coreaudio-sysdependency. - Emscripten: Switch to
web-syson the emscripten target. - JACK: Update
jackdependency. - WASAPI: Update
windows-rsdependency.
cpal 0.14.2
Removed
nixdependency.
cpal 0.14.1
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.