winzik/engine/tests/Audio
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David Nurdin abe53600c5 Continuous music stream on SDL_mixer's output (no gaps between blocks)
Desktop: the music was played as one SDL_mixer chunk per block, each started
when the previous one ended, at frame precision: a gap of up to a frame at each
block (measured on the real Freedoom song: 8 gaps, 371 ms of silence in 5 s).

- php-sdl-mixer (docker/ext/php-sdl-mixer-stream.patch): a ring buffer fed by
  PHP (JumPHP_StreamOpen / Push / Buffered / Clear / Volume / Close), read by
  Mix_HookMusic on SDL's audio thread, mixed with the sound effects by SDL_mixer,
  silence when empty. Resampling to the device rate in C.
- Mix_VolumeMusic does not reach the hook: the stream volume is set by PHP.
- PcmStream (desktop): uses the stream when the binding has it, the old chunks
  otherwise. The browser path is unchanged.
- Same functions in the desktop image and in the WebAssembly engine.
- Measured in capture (SDL disk driver): 0 gaps, the right frequency, sound
  effects and music in the same output. Listening test not done yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-14 17:16:10 +01:00
..
Audio3dTest.php OpenGL + OpenAL: PHP-OpenGL / PHP-OpenAL (Ponup) in every runtime 2026-10-28 16:44:36 +01:00
AudioLogTest.php Video maker: video:replay (a film of any game from scripted or recorded input, its sound logged and mixed offline), JUMPHP_INPUT_RECORD, JUMPHP_AUDIO_LOG, docs 2026-11-04 22:48:16 +01:00
PcmStreamTest.php Continuous music stream on SDL_mixer's output (no gaps between blocks) 2026-11-14 17:16:10 +01:00