Skip to content

Define and enforce visualizer buffer capacity - #232

Merged
kahrendt merged 2 commits into
mainfrom
fix/visualizer-buffer-limit
Sep 8, 2026
Merged

kahrendt merged 2 commits into
mainfrom
fix/visualizer-buffer-limit

Conversation

@maximmaxim345

Copy link
Copy Markdown
Member

Visualizer clients advertise buffer_capacity, but the spec does not require servers to enforce it or define when sent messages stop counting. Add a hard limit based on reassembled message bytes and future presentation timestamps on the server clock, with accounting reset by visualizer clear/end.

The player role already describes a hard limit, but its sending rule still uses lowercase "should not" rather than MUST NOT. Clarifying player accounting and aligning that wording are tracked separately in #230.

@kahrendt kahrendt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kahrendt
kahrendt merged commit 0982a59 into main Sep 8, 2026
1 check passed
@kahrendt
kahrendt deleted the fix/visualizer-buffer-limit branch September 8, 2026 13:42
maximmaxim345 pushed a commit that referenced this pull request Oct 20, 2026
…#307)

<!-- Describe the change and why it is needed. -->

The visualizer role didn't define how an in-place `stream/start` treats
data received under the previous configuration, which `messaging.md`
leaves to each role. Match the player: frames sent before the update
keep the previous configuration, and clients keep buffered frames and
interpret each under the configuration in effect when it was received.
Also state that an in-place `stream/start` doesn't reset the
`buffer_capacity` count, as the player role does.

This matches what the existing timestamp-ordering (#229) and
buffer-accounting (#232) rules already assume, and what sendspin-server
and the aiosendspin server do.

Closes #306

### Breaking changes

- **sendspin-cpp**: drops all buffered visualizer frames on any
`stream/start` and decodes at delivery time with the current
`n_disp_bins`. It must keep frames across an in-place start and decode
each under its own configuration.

- [x] I accept the [Contributor License
Agreement](../blob/main/CONTRIBUTOR-LICENSE-AGREEMENT.md) for this
contribution.
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.

2 participants