Graphics and sound fixes
How the Xbox-era renderer and audio got onto SDL2, OpenGL and a 5-channel float mixer, and how the music and voice streams of the PC release were made to play.
The renderer and the base audio landed in the first commit (962139d), so there's no "before" to diff;
those steps show the key code as excerpts. Music and streams came later, with real diffs.
1Render into a backbuffer, present it scaled
The game draws into an off-screen framebuffer at the render resolution; presenting draws that texture as one quad into the window. Everything else (resolution, letterboxing, motion blur) hangs off this.


2Decode console-flavoured textures
Xbox textures are swizzled (Morton order) and fonts are 8-bit palettized. They're unswizzled and expanded to RGBA
before glTexImage2D.
PS2 alpha goes 0–128, because 128 means "fully opaque" on the GS. Twenty years later we're still multiplying by two.
3One mixer for everything
A single SDL audio callback at 48 kHz, 5 float channels: music and voice streams first, sound effects on top. Locks around it keep the game thread from swapping streams mid-buffer.

4Turn the soundtrack on
The retail scripts only queue the soundtrack when running from CD or with TestMusicFromHost. CD mode drags
debug behaviour along, so a one-line script patch flips the other switch.
5Find the tracks: hex names and a .wad
The PC release names music files after the checksum of the track name, in hex (a9a6af00.bik), and packs
the voice streams into pcm.wad, indexed by pcm.dat.
6Decode Bink audio, resample, spread over 5 channels
A built-in Bink audio decoder (binkaudio.cpp) feeds a streamer that resamples to 48 kHz (with pitch,
because the game bends voice pitch) and places stereo on the 5 mixer channels the way sound effects do.
(void)fPitch; is a stub's way of saying "I heard you, I just don't care". Now it cares.