Skip to content

chore(deps): bump cpal from 0.17.3 to 0.18.1#9

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/cpal-0.18.1
Open

chore(deps): bump cpal from 0.17.3 to 0.18.1#9
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/cpal-0.18.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 9, 2026

Copy link
Copy Markdown
Contributor

Bumps cpal from 0.17.3 to 0.18.1.

Release notes

Sourced from cpal's releases.

cpal 0.18.1

A quick follow-up to 0.18.0 primarily to fix the docs.rs build failure.

  • docs.rs: Excluded pipewire, whose system dependency isn't available in that sandboxed build environment.
  • WASM: Fixed the audioworklet feature failing to compile on wasm32-wasip1 and other non-browser wasm32 targets.

No API or behavioral changes.

Links

cpal 0.18.0

Hey everyone! cpal 0.18.0 is out, bringing two long-requested native Linux backends, a unified error API, and accurate timestamps across every platform.

What's New

Native PipeWire and PulseAudio

Two new first-class backends join the Linux and BSD lineup:

  • PipeWire
  • PulseAudio

Enable them with the pipewire and pulseaudio Cargo features. When multiple backends are compiled in, cpal selects the best available one at runtime: PipeWire > PulseAudio > ALSA.

Unified Error API

All per-operation error enums (DevicesError, BuildStreamError, StreamError, etc.) are replaced by a single cpal::Error with a kind() getter:

match device.default_output_config() {
    Err(e) => match e.kind() {
        cpal::ErrorKind::DeviceNotAvailable => { /* ... */ }
        cpal::ErrorKind::DeviceBusy => { /* retry */ }
        _ => { /* ... */ }
    }
}

Two new error kinds make previously indistinguishable cases actionable: DeviceBusy (EBUSY/EAGAIN is retryable) and PermissionDenied for OS-level access denials. See the upgrading guide for the mapping table.

Accurate Timestamps and A/V Sync

Timestamps previously reflected when the callback fired rather than when audio would actually reach hardware. This release corrects that across every backend:

  • AAudio: pipeline buffer depth accounted for; fallback to zero on error fixed

... (truncated)

Changelog

Sourced from cpal's changelog.

[0.18.1] - 2026-06-07

Fixed

  • Exclude pipewire from the docs.rs build; system dependency not available in its environment.
  • Fix wasm-bindgen causing compile errors on non-browser wasm32 targets such as wasm32-wasip1.

[0.18.0] - 2026-06-06

Added

  • New ErrorKind variants for the unified error type: BackendError (platform error without a specific mapping); DeviceBusy (retryable device access, e.g. EBUSY/EAGAIN); DeviceChanged (audio route changed to another device); InvalidInput (invalid caller-supplied values); PermissionDenied (OS-level access denial); RealtimeDenied (real-time scheduling refused — previously only printed to stderr); ResourceExhausted (OS thread/memory limits); UnsupportedOperation (backend or device does not implement the operation).
  • Device now implements PartialEq, Eq, Hash, Display, and Debug on all backends.
  • realtime feature for real-time audio thread scheduling without a D-Bus build dependency.
  • StreamTrait::now() to query the current instant on the stream's clock.
  • StreamTrait::buffer_size() to query the stream's current buffer size in frames per callback.
  • SAMPLE_RATE_CD (44100 Hz) and SAMPLE_RATE_48K (48000 Hz) constants.
  • SupportedStreamConfigRange::try_with_standard_sample_rate() and with_standard_sample_rate() to select 48 kHz or 44.1 kHz from a range.
  • SupportedStreamConfigRange::contains_rate() to test whether a sample rate falls within a range.
  • StreamConfig and SupportedStreamConfig now implement Copy.
  • BufferSize now implements Default (returns BufferSize::Default).
  • SupportedBufferSize now implements Default (returns SupportedBufferSize::Unknown).
  • HostTrait::device_by_id() is now backend-dispatched, allowing each host to override the default implementation.
  • DSD512 sample rates added to the common rate probe list.
  • AAudio: Streams now request PERFORMANCE_MODE_LOW_LATENCY with the realtime feature; reports ErrorKind::RealtimeDenied if not granted.
  • ALSA: device_by_id() now accepts PCM shorthand names such as hw:0,0 and plughw:foo.
  • CoreAudio: tvOS target support (Tier 3, requires nightly).
  • PipeWire: New host for Linux and BSD via the native PipeWire API.
  • PulseAudio: New host for Linux and BSD via the PulseAudio API.
  • WASAPI: F64 sample format support.

Changed

  • Changed per-operation error types (DevicesError, SupportedStreamConfigsError, etc.) and HostUnavailable into a unified Error/ErrorKind. See https://github.com/RustAudio/cpal/blob/master/UPGRADING.md.
  • DeviceTrait now requires PartialEq + Eq + Hash + Debug + Display with a stable device ID.
  • DeviceTrait::build_*_stream() now takes StreamConfig by value instead of &StreamConfig.
  • StreamInstant API changed and extended to mirror std::time::Instant/Duration. See https://github.com/RustAudio/cpal/blob/master/UPGRADING.md for migration details.
  • Streams no longer start automatically on build_*_stream(); call play() explicitly. Previously ALSA, CoreAudio, and JACK auto-started streams on creation.
  • Default output and input configs now prefer 48 kHz, then 44.1 kHz, then the device maximum.

... (truncated)

Commits
  • 94ecb6e fix(ci): docs.rs has libjack-jackd2-dev
  • 50d9646 ci: check with all features (#1240)
  • 51f96e9 chore: prepare for v0.18.1 release
  • 189db47 fix: exclude pipewire from docs.rs (#1239)
  • 45fe976 fix(wasm): all features without atomics
  • baa3678 doc: finalize changelog and upgrading guide for v0.18 release (#1238)
  • 27473ac fix(pipewire): use node.latency and re-promote RT when re-negotiated (#1236)
  • 0048977 perf(alsa): optimize enumeration speed (#1233)
  • 7d4aedb chore(jack): pin to >= 0.13.5 (#1231)
  • d2a2688 fix(pulseaudio): use device names as id (#1228)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [cpal](https://github.com/RustAudio/cpal) from 0.17.3 to 0.18.1.
- [Release notes](https://github.com/RustAudio/cpal/releases)
- [Changelog](https://github.com/RustAudio/cpal/blob/master/CHANGELOG.md)
- [Commits](RustAudio/cpal@v0.17.3...v0.18.1)

---
updated-dependencies:
- dependency-name: cpal
  dependency-version: 0.18.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github

dependabot Bot commented on behalf of github Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: dependencies. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@kilo-code-bot

kilo-code-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

Breaking changes in cpal 0.18.0 require code updates:

cpal 0.18.0 changed DeviceTrait::build_*_stream() to take StreamConfig by value instead of by reference.

The file crates/milkrust-desktop/src/audio_provider.rs (lines 247-279) passes &cpal::StreamConfig to build_input_stream(). This signature changed in cpal 0.18.0:

// Old (cpal 0.17):
.device.build_input_stream(
    config,  // &StreamConfig
    ...
)

// New (cpal 0.18):
.device.build_input_stream(
    config,  // StreamConfig (by value)
    ...
)

Additionally, the unified error API changes (DevicesError, BuildStreamErrorcpal::Error) may require updating error handling on lines 170-171, 217, and 279.

See: https://github.com/RustAudio/cpal/blob/master/UPGRADING.md

Other Observations (not in diff)

N/A - the actual code changes needed are in audio_provider.rs which is not modified in this PR but will require updates for compatibility.

Files Reviewed (2 files)
  • crates/milkrust-desktop/Cargo.toml - Version bump only
  • crates/milkrust-desktop/src/audio_provider.rs - Affected by API changes (not in diff)

Reviewed by laguna-m.1-20260312:free · 402,587 tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants