Open
Conversation
Design for 6 standalone feature showcase examples: - DiscoveryExample, MetadataClient, ControllerClient - MultiCodecPlayer, ErrorRecovery, ClockSyncDiagnostics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements a standalone Swift package that shows how to discover Sendspin servers on the local network using mDNS/Bonjour. Features: - ArgumentParser CLI with --timeout and --verbose flags - Clean output showing server name, URL, hostname, port - Display of metadata from TXT records in verbose mode - Exit codes: 0 for success (servers found), 1 for failure (none found) - Comprehensive README with usage examples and troubleshooting The example follows the CLIPlayer pattern with Package.swift referencing SendspinKit via relative path and includes teaching-quality comments explaining the why behind each operation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Prevents .build directory from being tracked in version control. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements a metadata-only client demonstrating: - Connecting with metadata@v1 role (no audio playback) - Auto-discovery via mDNS or manual server URL - Real-time metadata display (title, artist, album, duration) - Teaching-quality comments explaining async event streams - ArgumentParser CLI with validation - Clean console output without TUI complexity This example showcases: - Role-based capability negotiation - Resource-efficient metadata-only consumption - Async stream event handling patterns - Server discovery integration - Change detection to avoid duplicate displays Perfect for display screens, monitoring systems, or lightweight integrations that need track info without audio. Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements a "silent player" that demonstrates playback control without local audio output. This example shows: - Using player@v1 role with minimal configuration - Sending volume and mute control commands via SendspinClient API - Interactive keyboard control with raw terminal input - Metadata monitoring to show what's playing - Silent operation (audio received but not consumed) The example clarifies that controller@v1 role is reserved for future server-coordinated multi-room control, while the current use case (controlling your own playback without audio output) uses the player role as a "silent player". Control methods available in SendspinClient API: - setVolume(_ volume: Float) - Set volume from 0.0 to 1.0 - setMute(_ muted: Bool) - Set mute state Files created: - Examples/ControllerClient/Package.swift - Examples/ControllerClient/Sources/ControllerClient/main.swift - Examples/ControllerClient/README.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed "controller@v1" to "player@v1 + metadata@v1" to accurately reflect the silent player pattern implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement a comprehensive example showing how to negotiate audio formats with SendspinKit servers. This example demonstrates: - Creating PlayerConfiguration with multiple AudioFormatSpec in priority order - Observing which format the server negotiates via .streamStarted event - Supporting hi-res audio formats (up to 384kHz/32-bit) - Comparing requested formats vs. negotiated format - Understanding codec tradeoffs (Opus, FLAC, PCM) The example includes: - ArgumentParser CLI with flexible options - Server discovery or direct connection - Configurable codec preferences (--prefer) - Configurable sample rate and bit depth - Session duration control - Rich output showing negotiation details and codec characteristics Files created: - Examples/MultiCodecPlayer/Package.swift - Examples/MultiCodecPlayer/Sources/MultiCodecPlayer/main.swift - Examples/MultiCodecPlayer/README.md This example is particularly useful for understanding: - How supportedFormats array priority affects negotiation - What happens when server doesn't support preferred format - Hi-res audio support capabilities - Bitrate calculations for different formats 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…terns Implements comprehensive error handling and reconnection logic example that demonstrates production-ready resilience patterns for SendspinKit clients. Key features: - Exponential backoff with jitter to prevent thundering herd - Connection state machine tracking lifecycle transitions - Error classification (retryable vs non-retryable) - Circuit breaker pattern with max retry limits - Graceful shutdown handling (SIGINT) - Detailed logging of state transitions and timing - Configurable retry behavior via CLI arguments Teaching points: - When to retry vs when to give up - How to avoid overwhelming recovering servers - State machine design for connection management - Error categorization for smart retry logic - Production monitoring and debugging practices Usage: swift run ErrorRecovery --server ws://localhost:8927 swift run ErrorRecovery --discover --max-retries 10 --retry-delay 2.0 Files created: - Examples/ErrorRecovery/Package.swift - Examples/ErrorRecovery/Sources/ErrorRecovery/main.swift - Examples/ErrorRecovery/README.md The example includes comprehensive documentation with test scenarios, backoff calculation tables, and production recommendations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix shutdown race condition by awaiting event task cancellation - Add non-retryable error cases for teaching completeness - Distinguish unknown errors with warning symbol 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ClockSyncDiagnostics example package - Real-time display of clock synchronization metrics - Shows offset, RTT, drift rate, and quality indicators - Educational output explaining what the numbers mean - Supports server discovery and direct connection - Configurable display refresh interval - Expose clock synchronization statistics via SendspinClient - Add getClockStats() method to SendspinClient - Extend ClockStats struct to include drift and sampleCount - Allows monitoring of sync quality from client applications - Comprehensive README documenting: - NTP-style 4-way handshake protocol - Kalman filter drift compensation - Why sub-millisecond sync matters for multi-room audio - How to interpret RTT, offset, and drift metrics Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Provides quick start guide, examples table, common CLI patterns, learning path recommendations, and contribution guidelines. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove all .build/ directories from git tracking - Add .gitignore to MultiCodecPlayer 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
New Examples
Key Characteristics
API Changes
getClockStats()method toSendspinClientClockStatsstruct withdriftandsampleCountfieldsTest plan
🤖 Generated with Claude Code