Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
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]

### Fixed

- **PipeWire**: Fix non-monotonic timestamps on unusual clock readings.

## [0.18.1] - 2026-06-07

### Fixed
Expand Down Expand Up @@ -1285,6 +1291,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial commit.

[Unreleased]: https://github.com/RustAudio/cpal/compare/v0.18.1...HEAD
[0.18.1]: https://github.com/RustAudio/cpal/compare/v0.18.0...v0.18.1
[0.18.0]: https://github.com/RustAudio/cpal/compare/v0.17.3...v0.18.0
[0.17.3]: https://github.com/RustAudio/cpal/compare/v0.17.2...v0.17.3
Expand Down
8 changes: 4 additions & 4 deletions src/host/pipewire/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ where
Some(t) => {
let delay_ns = t.delay() * 1_000_000_000i64 / t.rate().denom as i64;
(
StreamInstant::from_nanos(t.now() as u64),
StreamInstant::from_nanos((t.now() - delay_ns.max(0)) as u64),
StreamInstant::from_nanos(t.now().max(0) as u64),
StreamInstant::from_nanos((t.now() - delay_ns.max(0)).max(0) as u64),
)
Comment thread
roderickvd marked this conversation as resolved.
}
None => {
Expand Down Expand Up @@ -345,8 +345,8 @@ where
Some(t) => {
let delay_ns = t.delay() * 1_000_000_000i64 / t.rate().denom as i64;
(
StreamInstant::from_nanos(t.now() as u64),
StreamInstant::from_nanos((t.now() + delay_ns.max(0)) as u64),
StreamInstant::from_nanos(t.now().max(0) as u64),
StreamInstant::from_nanos((t.now() + delay_ns.max(0)).max(0) as u64),
)
Comment thread
roderickvd marked this conversation as resolved.
}
None => {
Expand Down
Loading