Fix residual audio from previous cassette on file switch
Clear the SDL audio device queue in switch_file() so leftover samples from the previous cassette don't play when the new one starts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
201a8fae97
commit
25824d4728
@ -43,6 +43,10 @@ This document specifies the functional requirements for an SDL2 based media play
|
|||||||
|
|
||||||
## 6. Changelog
|
## 6. Changelog
|
||||||
|
|
||||||
|
### 2026-02-14 — Fix residual audio on cassette switch
|
||||||
|
|
||||||
|
- **Clear device queue on switch**: `switch_file()` now calls `SDL_ClearQueuedAudio()` after pausing the audio device, preventing a brief snippet of the previous cassette from playing when the new one starts.
|
||||||
|
|
||||||
### 2026-02-14 — Split-screen layout with artwork focus
|
### 2026-02-14 — Split-screen layout with artwork focus
|
||||||
|
|
||||||
- **Vertical left panel**: Transport controls (Prev, Rewind, Play/Stop, FF, Next) are stacked vertically in a 200px-wide left panel. Play/Stop is slightly larger (72x72) at the vertical center; other buttons are 56x56.
|
- **Vertical left panel**: Transport controls (Prev, Rewind, Play/Stop, FF, Next) are stacked vertically in a 200px-wide left panel. Play/Stop is slightly larger (72x72) at the vertical center; other buttons are 56x56.
|
||||||
|
|||||||
@ -522,6 +522,7 @@ static void switch_file(int index) {
|
|||||||
|
|
||||||
paused = SDL_TRUE;
|
paused = SDL_TRUE;
|
||||||
SDL_PauseAudioDevice(audio_device, 1);
|
SDL_PauseAudioDevice(audio_device, 1);
|
||||||
|
SDL_ClearQueuedAudio(audio_device);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user