Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pocketstation"
version = "1.1.6"
version = "1.1.7"
edition = "2021"
rust-version = "1.95.0"
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ application PCM ─────┘ ├─ Endpoint or Con
You need Rust 1.95 or newer. Native capture is enabled by default.

```bash
cargo add pocketstation@1.1.6
cargo add pocketstation@1.1.7
```

Capture any running application with the same API on macOS, Windows, and Linux:
Expand Down Expand Up @@ -57,7 +57,7 @@ For tooling that only inspects PocketStation types or builds documentation,
disable native capture:

```toml
pocketstation = { version = "1.1.6", default-features = false }
pocketstation = { version = "1.1.7", default-features = false }
```

## Choose a task
Expand Down
10 changes: 10 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ This page covers user-visible changes in the PocketStation 1.x release line.

## Unreleased

## 1.1.7 — 2026-09-03

Route metrics no longer report a queue depth above the route's configured
capacity when producer and consumer counters are sampled concurrently. Audio
delivery and queue storage are unchanged.

```console
cargo update -p pocketstation --precise 1.1.7
```

## 1.1.6 — 2026-09-03

Configure route delivery with one consistent set of names.
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/rust-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Native build requirements:
## Add PocketStation

```bash
cargo add pocketstation@1.1.6
cargo add pocketstation@1.1.7
```

## Capture in three lines
Expand Down
31 changes: 25 additions & 6 deletions src/runtime/audio/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,15 @@ impl EdgeTelemetry {
}

fn queue_depth_frames(&self) -> u64 {
self.enqueued_total.load(Ordering::Relaxed).saturating_sub(
self.delivered_total
.load(Ordering::Relaxed)
.saturating_add(self.shutdown_discarded_total.load(Ordering::Relaxed))
.saturating_add(self.discarded_output_frames_total.load(Ordering::Relaxed)),
)
self.enqueued_total
.load(Ordering::Relaxed)
.saturating_sub(
self.delivered_total
.load(Ordering::Relaxed)
.saturating_add(self.shutdown_discarded_total.load(Ordering::Relaxed))
.saturating_add(self.discarded_output_frames_total.load(Ordering::Relaxed)),
)
.min(self.queue_capacity_frames)
}

fn observe_output_discard(&self) {
Expand Down Expand Up @@ -1529,6 +1532,22 @@ mod tests {
assert_eq!(snapshot.overruns_total, 1);
}

#[test]
fn given_delivery_counter_lag_when_queue_depth_is_sampled_then_capacity_is_the_maximum() {
// Given
let telemetry = EdgeTelemetry::new(8);
telemetry.enqueued_total.store(9, Ordering::Relaxed);

// When
telemetry.observe_enqueue();
let snapshot = telemetry.snapshot();

// Then
assert_eq!(snapshot.queue_capacity_frames, 8);
assert_eq!(snapshot.queue_depth_frames, 8);
assert_eq!(snapshot.queue_peak_frames, 8);
}

#[test]
fn given_observation_handle_when_consumer_detects_gap_then_live_discontinuity_is_visible() {
// Given
Expand Down