Repository navigation
Raise default min_buffer_ms to 1s - #341
Merged
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)