SDL Audio Double‑Buffer Rollback After Mid‑Play Sample Rate Change
0 reputation · 25 Aug 2024, 09:30 UTC
Goal: Verify that SDL_SetAudioDevice sample rate change while audio buffers are queued results in a clean rollback without audible glitches.
Constraint: The SDL API provides no transactional rollback for in‑flight buffers, and SDL 2.26’s sample rate handling may introduce race conditions when multiple audio devices are active.
Questions: 1) Does SDL guarantee atomic rollback of queued audio buffers after a sample rate change? 2) Under what conditions can concurrent device usage break rollback safety? 3) How can rollback behavior be verified programmatically without relying on undocumented source inspection?