Files
source/sgp
13c4be7382 soundman: allow playing a sound file held in memory
Smacker video carries its audio as PCM that the video decoder produces
itself, so there is no file for the sound module to open. Add
SoundPlayFromBuffer(), which streams from a caller-owned memory buffer.

It deliberately does not go through the sample cache: a full length intro
video decodes to close to 20 MB of PCM, which does not fit in the cache's
memory budget and would evict everything else on the way to failing. The
channel bookkeeping already has a notion of a stream with no cache slot
behind it (uiSample == -1), which is what streamed files use, so the buffer
simply stays the caller's property for as long as the sound plays.

To share the parameter handling, everything SoundStartStream() did after
opening the stream moves unchanged into SoundStartOpenedStream().

No caller yet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 19:01:37 -03:00
..
2025-01-02 08:02:52 -03:00
2025-02-24 21:42:36 +02:00
2025-02-24 21:42:36 +02:00
2026-07-21 14:42:52 -03:00
2025-09-24 16:14:10 +03:00
2025-02-24 21:42:36 +02:00