push-woxnxzvpmkkl #134

Merged
eric merged 17 commits from push-woxnxzvpmkkl into main 2026-09-20 06:12:24 +02:00
Owner
No description provided.
eric added 17 commits 2026-09-20 06:11:08 +02:00
Refactor the player architecture to decouple client logic, implement the platform-agnostic player core, and refine command handling across the system.
This change introduces a rule requiring auxiliary tasks to be interruptible via a `stop_token`, allowing them to react to cancellation signals. It adjusts the pipeline logic to ensure tasks can be aborted directly, fixing pacing issues where tasks were unaware of cancellation signals.
Updates streaming sinks to handle broadcast cancellation and timing failures. This includes modifying broadcast function signatures to accept stop tokens, implementing intelligent backpressure logic to skip frames when timing fails, and managing dedicated broadcaster tasks that can be aborted upon cancellation.
This change modifies how player position events are handled, introducing specific logic for position data while ignoring general data due to reliability concerns. It also updates the `PlayerEvent::TrackEnded` event to transition the playback state to `PlaybackState::Transitioning`.
Updates the internal state management to reflect the removal of the Stopped state from the client-side enumeration and implements the corresponding logic for PlaybackState::Stopped.
Adds handling for the "purge" command to reset queue state, and implements the "volume" command to clamp and normalize input values.
Refine the implementation of the `stop` command, defining it as a sequence of `pause` and `purge` actions, and clarify that it is a backend operation. Additionally, new control commands like `Volume`, `Seek`, and `Mute` are introduced, along with updates to client state reporting logic.
Implement mechanisms for client-side back-pressure and explicit state management. This includes defining the `DeviceAdapter` trait, adding handlers for stop/seek/load operations, and managing client readiness via epoch and grant signals.
Adds functionality to play the previous item from a renderer's queue, including client-side logic and a new API endpoint for seeking previous tracks.
Refactors the audio player to utilize a Rust core and WebAssembly for rendering, introducing a comprehensive transport layer. This includes logic for handling client reconnections, discarding stale streams, and restarting playback. Core playback state management is implemented via a Session struct, and the renderer handles thread-safe command dispatch, volume control, and PCM chunk processing.
This change introduces mechanisms for accurately tracking underrun frames during playback, enhances buffering logic to prevent startup glitches, and refines error handling for reporting playback state across native and web layers.
Refine playback controls, including volume, mute, and seek functionality. Introduce new synchronization logic for queue management and correct track-end handling to ensure playback guarantees.
Implemented logic to correctly handle missing sample rates during encoder setup and updated the epoch bumping flow to prevent expired epochs from discarding audio frames.
Introduces asynchronous behavior for control point queue management, implementing prefetching logic, and refining track announcement mechanisms within the music renderer. This includes moving track announcement logic to the renderer, implementing gapless transition handling, and adding error handling for playback failures. Also addresses limitations regarding track continuation and prevents deadlocks during track announcement.
Updates the streaming protocol to correctly calculate playback position based on epoch start times, ensuring the progress bar resets correctly after a seek.

This change introduces the `start_sec` field in the protocol structure and updates session logic to explicitly track epoch start positions. This ensures that new epochs begin at the correct track position, and position changes are calculated accurately based on the current epoch's start time. New unit tests verify this corrected streaming protocol logic.
This update introduces epoch tracking across the playback pipeline, modifies state management to handle natural transitions, and implements robust logic for client interruption scenarios, ensuring proper state reporting and data flow.
Refactor playback synchronization and track transition logic
All checks were successful
Release / create-release (push) Successful in 10s
d9c1910b04
This update synchronizes the UI with actual audio playback events, refining how track transitions (natural vs. user-initiated) are handled. It introduces new API methods for renderer control, updates the protocol serialization for position reporting, and implements a new transition gating mechanism to manage track changes based on gapless playback status.
eric merged commit 9aca07c450 into main 2026-09-20 06:12:24 +02:00
eric deleted branch push-woxnxzvpmkkl 2026-09-20 06:12:30 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
eric/pmomusic!134
No description provided.