mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-21 22:15:40 +00:00
3f1b6fd92d
The previous optimization skipped all rate-switch logic in standard mode, but left the stream at e.g. 88.2 kHz if Hi-Res was toggled off mid-session. Fix: store device_default_rate (from cold-start open) in AudioEngine. In audio_play, compute target_rate = hi_res ? output_rate : device_default_rate and reopen only when target differs from current — no-op cost when already at the right rate (the common case in pure standard mode). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>