diff --git a/CHANGELOG.md b/CHANGELOG.md index bc7e71a1..6d4353b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,13 +8,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased -- Breaking: `Done` now calls a callback instead of decrementing an `Arc`. + +### Added + - Added `Skippable::skipped` function to check if the inner source was skipped. + +### Changed + +- Breaking: `Done` now calls a callback instead of decrementing an `Arc`. +- Updated `cpal` to v0.18. + +### Fixed + - Fixed `Player::skip_one` not decreasing the player's length immediately. ## Version [0.22.2] (2026-02-22) ### Fixed + - Incorrectly set system default audio buffer size breaks playback. We no longer use the system default (introduced in 0.22 through cpal upgrade) and instead set a safe buffer duration. - Audio output fallback picked null device leading to no output. - Mixer did not actually add sources sometimes. diff --git a/Cargo.lock b/Cargo.lock index 2bb2b5d0..a6c0dce1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -234,9 +234,8 @@ dependencies = [ [[package]] name = "cpal" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8942da362c0f0d895d7cac616263f2f9424edc5687364dfd1d25ef7eba506d7" +version = "0.18.0" +source = "git+https://github.com/RustAudio/cpal#2622b29052dc972647f0d8ea65709776fcc3b0d7" dependencies = [ "alsa", "coreaudio-rs", diff --git a/Cargo.toml b/Cargo.toml index aadcfa4d..7a1d5d25 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -116,7 +116,7 @@ rustdoc-args = ["--cfg", "docsrs"] cargo-args = ["-Zunstable-options"] [dependencies] -cpal = { version = "0.17", optional = true } +cpal = { git = "https://github.com/RustAudio/cpal", optional = true } dasp_sample = "0.11" claxon = { version = "0.4", optional = true } hound = { version = "3.5", optional = true } diff --git a/src/microphone.rs b/src/microphone.rs index cc9788a7..dbedeba3 100644 --- a/src/microphone.rs +++ b/src/microphone.rs @@ -282,7 +282,7 @@ impl Microphone { match config.sample_format { $( cpal::SampleFormat::$sample_format => device.build_input_stream::<$generic, _, _>( - &config.stream_config(), + config.stream_config(), move |data, _info| { for sample in SampleTypeConverter::<_, Sample>::new(data.into_iter().copied()) { let _skip_if_player_is_behind = tx.push(sample); diff --git a/src/speakers/builder.rs b/src/speakers/builder.rs index 3745552e..6169fa59 100644 --- a/src/speakers/builder.rs +++ b/src/speakers/builder.rs @@ -596,7 +596,7 @@ where match config.sample_format { $( cpal::SampleFormat::$sample_format => device.build_output_stream::<$generic, _, _>( - &cpal_config2, + cpal_config2, move |data, _| { data.iter_mut().for_each(|d| { *d = source diff --git a/src/stream.rs b/src/stream.rs index 66cb9347..de1e609d 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -539,7 +539,7 @@ impl MixerDeviceSink { match config.sample_format { $( cpal::SampleFormat::$sample_format => device.build_output_stream::<$generic, _, _>( - &cpal_config, + cpal_config, move |data, _| { data.iter_mut().for_each(|d| { *d = samples