Update for sendspin-rs v0.2.0 breaking API changes#35
Merged
Conversation
Adapt to the breaking changes that landed in sendspin-rs between our previous pin and the v0.2.0 release: - ClientState gained `state: Option<ClientSyncState>` and PlayerState lost its sync state field; switch to ClientSyncState::Synchronized at the ClientState level and use PlayerState::default() to absorb newly-added optional fields (static_delay_ms, supported_commands). - ControllerCommand.command moved from String to ControllerCommandType; add a string→enum mapping at the command channel boundary. - ServerCommand is now a typed Message variant with PlayerCommandType, replacing the manual JSON parsing of `server/command` payloads. - ClockSync::new() now requires Arc<dyn Clock>; t1/t4 must come from Clock::now_micros() (raw monotonic, NTP-immune) rather than SystemTime::now() against UNIX_EPOCH. - Bump cpal 0.15 → 0.17 to match the version sendspin-rs leaks through its public API (SyncedPlayer takes cpal::Device); update device enumeration for cpal 0.17's deprecation of name() in favour of description() and the SampleRate wrapper removal. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI runs Rust 1.95 where clippy promotes `.map(<f>).unwrap_or(<a>)` on Result to a hard error under -D warnings. Local toolchains pre-1.95 don't catch this. Replace with the equivalent `.map_or(<a>, <f>)`, which is the exact replacement clippy suggested. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
I'm trying to track down an audio glitch bug in the desktop app that I found from testing this. I'll come back and mark it as ready for review when I've figured out where it's coming from. |
Contributor
Have a look at #34 as this fixes the audio glitch bug |
Contributor
Author
|
Tracked down the audio glitch I was looking at, it's not a result of this change. But we'll should follow this up relatively quickly with #34 |
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.
Adapt to the breaking changes that landed in sendspin-rs between our previous pin and the v0.2.0 release:
state: Option<ClientSyncState>and PlayerState lost its sync state field; switch to ClientSyncState::Synchronized at the ClientState level and use PlayerState::default() to absorb newly-added optional fields (static_delay_ms, supported_commands).server/commandpayloads.