Skip to content

Raise default min_buffer_ms to 1s - #341

Merged
maximmaxim345 merged 1 commit into
mainfrom
fix/raise-default-min-buffer
Aug 25, 2026
Merged

maximmaxim345 merged 1 commit into
mainfrom
fix/raise-default-min-buffer

Conversation

@maximmaxim345

Copy link
Copy Markdown
Member

A client that advertises no timing preferences falls back to the server default, so most ESPHome players run on it. At 500ms that is the entire jitter budget for a device on WiFi, where hiccups of one to two seconds are possible.

Measured against the late chunk timings in music-assistant/support#6006, moving from the 250ms those reports ran on to 500ms accounts for about 40% of the drops, and 1s for about 80%. The cost is 500ms of extra scheduling lead before the first chunk plays.

Follows the same reasoning as #285, which raised this default from 250ms to 500ms.

This will of course not be needed anymore once proper measurement is implemented (powered by Sendspin/spec#167)

Clients that advertise no timing preferences get the server default, which
left WiFi players with 500ms of jitter headroom. Measured against the late
chunk timings reported in music-assistant/support#6006, 1s covers about 80%
of the drops that 250ms did not.

Copilot AI 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.

Pull request overview

Raises the server fallback player buffer from 500 ms to 1 second to reduce Wi-Fi-related audio drops.

Changes:

  • Updates the default min_buffer_ms.
  • Adjusts unit and integration timing expectations.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
aiosendspin/server/roles/player/v1.py Raises the fallback buffer default.
tests/server/roles/test_player_v1.py Verifies the new default.
tests/server/test_push_stream_behavior.py Updates stream scheduling expectations.
tests/integration/test_multi_player_timing_integration.py Updates integration timing assertions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@maximmaxim345
maximmaxim345 merged commit 8d5b129 into main Aug 25, 2026
4 of 5 checks passed
@maximmaxim345
maximmaxim345 deleted the fix/raise-default-min-buffer branch August 25, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants