Bug:
-
Unified Sendspin playback chain lifecycle across
stream clear / stream end / pause-play / reconnectscenarios to prevent reuse of underrun or destabilizedAudioTrackinstances. #63 -
Fixed legacy playback chain not being fully decommissioned after
stream end, reducing "half-beat" sync drift and baseline pollution on restart. -
Hardened
clearBuffer()decommissioning strategy: active playback chains now undergo clean rebuilds instead of mereflushoperations when necessary. -
Fixed buffer accumulation during prolonged
WAITING_FOR_STARTstates by adding controlled forced-playback protection. -
Added protection against extreme timestamp jumps: reconstructs timeline baseline instead of padding multi-MB silence blocks when gaps exceed reasonable thresholds.
-
Fixed buffer saturation, consecutive packet drops, and GC jitter triggered by anomalous gaps.
-
Added anomalous output limits to Opus decoder to prevent memory/buffer exhaustion from single oversized PCM blocks.
-
Fixed Opus output reading to correctly decode using
BufferInfo.offset/sizeparameters. -
Tightened handoff logic between
pendingChunksand active playback queue to reduce startup-stage accumulation risks. -
Reinstated and fully enabled total PCM buffer ceiling to prevent unbounded queue growth.
-
Expanded Sendspin total buffer capacity to enhance continuous playback stability under network jitter.
-
Maintained backward compatibility: preserved legacy startup/sync philosophy while enhancing buffering capabilities only.
-
Fixed log spam during playback speed adjustments: devices lacking speed support now silently degrade instead of flooding logs.
-
Reset speed control state lifecycle across
stop / clear / idle / rebuildpaths to prevent state contamination of new streams. -
Added caching and rate-limiting to
AudioTrack.getTimestamp()to reduce system log spam and instability detection during reconstruction phases. -
Restricted timestamp usage timing to reduce amplification effects from device stalls or retrograde timestamps on the sync state machine.
-
Improved underrun detection conditions to prevent false positives during
INITIALIZING / WAITING_FOR_START / stream-switching gaps. -
Added aggressive recovery path post-underrun, enabling clean
AudioTrackreconstruction during actual playback states. -
Fixed intermittent song container visibility failures when initial media metadata arrives.
-
Adjusted first-packet metadata filtering: now only discards empty cold-start packets rather than swallowing legitimate debut metadata.
-
Fixed overly restrictive HA media metadata recognition: valid display now triggers if any of title, artist, or cover art is present.
-
Relaxed song container display conditions: no longer strictly dependent on
songTitle, now evaluates based on "any displayable content" criteria. -
Fixed song container mistakenly hiding during voice flows when we internally paused media: now distinguishes internal pauses from external stops.
-
Extracted media resumption arbiter to unify handling of
BUILT_IN_MEDIA / HA_MEDIA / SENDSPIN_PROTOCOL / VOICE_TTSline recovery. -
Resolved race condition risks from multiple simultaneous
resumecalls at voice end: now uses single-channel arbitration recovery. -
Enhanced reconnection compatibility: preserves legacy manual offset semantics while preventing old dynamic pipeline state contamination of new connections.
-
Maintained sync semantics where
0ms = auto modeand non-0ms = manual mode, preserving legacy user calibration habits. -
Added independent upstream playback position validator to continuously track
trackProgressMs / trackDurationMs / isPlaying. -
Integrated upstream position validation into critical recovery nodes:
clearBuffer / enterIdle / stream start / thaw / underrun rebuildfor timeline reconstruction. -
Sendspin sync strategy has evolved from "parameter tweaking" to a combined architecture of "clock synchronization + upstream position validation + clean playback chain reconstruction", preparing the codebase for release-grade stability.