Two independent gap sources, both confirmed fixed on Linux:
1. audiostream.c's Update() used if/else-if, so a loop restart
(clearing BUFFERED) couldn't re-trigger Buffer() until the *next*
frame's Update() noticed - up to one frame of dead air on every
loop, on every platform. Restructured to two sequential ifs so a
loop falls straight through into re-buffering in the same call.
2. audioStreamLinuxIsFinished only reported true once SDL's queue was
completely empty - meaning silence had already started by the time
"empty" could be observed, guaranteeing a gap by construction.
Changed it to report ready-to-refill once the queue drops to a
4096-frame lead margin (matching the SDL device's own internal
buffer size) instead of waiting for zero. SDL_QueueAudio only ever
appends to a FIFO, so refilling that early never causes overlap -
it just means the device's callback never runs dry.
Confirmed looping gaplessly on Linux.
Cross-platform audiostream/audio API with per-platform hooks for
PSP/Dolphin/Linux. Linux is fully wired end-to-end through SDL2
(device open, volume-mixed queueing, finish detection via
SDL_GetQueuedAudioSize) and verified playing a generated test tone
in engine.c. PSP and Dolphin hooks are stubbed for now.