Repository navigation
Fix silent serve --workers on macOS after sleep - #317
Merged
Merged
Conversation
On macOS, players heard no audio from a multi-worker serve after the Mac had slept, and the log filled with "Role queue full".
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the coordinator audio-clock alignment change.
No open issues 🎉
What changed in this PR
This PR fixes silent audio in multi-worker serve mode on macOS after sleep by aligning the coordinator’s audio clock with the workers’ clock.
Changes:
- Replace the platform-specific clock helper with
RawMonotonicClockfor audio timestamps and buffer pacing. - Add a regression test verifying that chunk timestamps use the worker clock plus the initial playback delay.
| File | Description |
|---|---|
tests/serve/test_coordinator.py |
Adds a regression test for worker-compatible chunk timestamps. |
sendspin/serve/coordinator.py |
Uses RawMonotonicClock for stream timing and buffer pacing. |
Review effort: Balanced
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.
What does this implement/fix?
On macOS,
sendspin serve --workerssent no audio after the Mac had slept, since the main process and the workers read two clocks that drift apart during sleep. Players connected but stayed silent, and the log filled with "Role queue full".The main process now uses the same clock as the workers. On Linux and Windows both sides already read the same clock, so nothing changes there.
Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementbreaking-changerefactordocumentationmaintenancecidependencies