diff --git a/CHANGELOG.md b/CHANGELOG.md index a2ab0172..ae469f45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved queue, buffer, mixer and sample rate conversion performance. ### Fixed - +- Fixed a 1-sample channel shift (L/R swap) in Player when rapidly appending stereo sources to an empty queue. - Fixed `Player::skip_one` not decreasing the player's length immediately. - Fixed `Source::current_span_len()` to consistently return total span length. - Fixed `Source::size_hint()` to consistently report actual bounds based on current sources. diff --git a/src/queue.rs b/src/queue.rs index 18ef70b1..cf065500 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -394,8 +394,8 @@ mod tests { let (tx, rx) = queue::queue(keep_alive); assert_eq!( rx.channels(), - nz!(1), - "Initial channels should be 1 (keep_alive={keep_alive})" + nz!(2), + "Initial channels should be 2 (keep_alive={keep_alive})" ); assert_eq!( rx.sample_rate(), diff --git a/src/source/empty.rs b/src/source/empty.rs index 13b6843b..a69b0e5f 100644 --- a/src/source/empty.rs +++ b/src/source/empty.rs @@ -42,7 +42,7 @@ impl Source for Empty { #[inline] fn channels(&self) -> ChannelCount { - nz!(1) + nz!(2) // Default to 2 (stereo) to prevent a 1-sample channel shifting bug in the Queue when swapping to stereo sources. } #[inline]