Skip to content

Limit min_buffer_ms to 0-5000 - #313

Merged
kahrendt merged 1 commit into
mainfrom
docs/min-buffer-fixed-range
Oct 21, 2026
Merged

kahrendt merged 1 commit into
mainfrom
docs/min-buffer-fixed-range

Conversation

@maximmaxim345

Copy link
Copy Markdown
Member

The server uses one send-ahead for a whole group, the largest across its players. So a single player reporting a very large min_buffer_ms delays playback for every player in the group.

This gives min_buffer_ms a fixed range of 0-5000, the same as output_delay_ms, and players clamp it themselves. That is technically a breaking change for players that report larger values today.

An alternative solution would be letting each server cap min_buffer_ms at its own value of at least 5000 ms. But 5s is already a really large buffer size.

@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 8085530 into main Oct 21, 2026
1 check passed
@kahrendt
kahrendt deleted the docs/min-buffer-fixed-range branch October 21, 2026 12:09
maximmaxim345 added a commit to Sendspin/aiosendspin that referenced this pull request Nov 17, 2026
…624)

# What does this implement/fix?

<!-- Quick description and explanation of changes. -->

The client SDK could send a `client/hello` name or `device_info` string
over 64 UTF-8 bytes, or a `min_buffer_ms` up to 30000. Conforming
servers close the connection on these, and an aiosendspin server in
strict mode rejects the client.

The client now cuts those strings to 64 bytes without splitting a
character, and clamps `min_buffer_ms` to 0-5000.

**Related issue or spec PR (if applicable):**

- Sendspin/spec#313
- Sendspin/spec#329
- Sendspin/spec#347

## Types of changes

<!--
Tick exactly one box. CI (.github/workflows/pr-labels.yaml) applies the
matching label, and the release notes use it to sort this change.
-->

- [x] Bugfix (non-breaking change which fixes an issue): `bugfix`
- [ ] New feature (non-breaking change which adds functionality):
`new-feature`
- [ ] Enhancement to an existing feature: `enhancement`
- [ ] Breaking change (changes the public API or the protocol in a way
that is not backwards compatible): `breaking-change`
- [ ] Refactor (no behavior change): `refactor`
- [ ] Documentation only: `documentation`
- [ ] Maintenance / chore: `maintenance`
- [ ] CI / workflow change: `ci`
- [ ] Dependencies bump: `dependencies`
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