diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-09 12:57:22 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-09 12:57:22 +0100 |
| commit | 807c6f5097897fac92428b939df020cdb70aae77 (patch) | |
| tree | e79322ab6a62b08a95cb3ecc7c7a24a962808f6c /src/test_demo.cc | |
| parent | 655d0a627c17b598562616a269e53bf06124d43f (diff) | |
fix: Audio startup hiccup - use fill_audio_buffer for pre-fill
- Added target_fill parameter to audio_render_ahead() for explicit control
- Pre-fill now uses fill_audio_buffer() (same logic as main loop)
- Ensures consistent tempo scaling and time advancement
- Reduced pre-fill from 400ms to 100ms (was blocking visuals)
- All 33 tests passing
handoff(Claude): Fixed audio startup silence/suspension issue
Diffstat (limited to 'src/test_demo.cc')
| -rw-r--r-- | src/test_demo.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test_demo.cc b/src/test_demo.cc index 749ef01..b8e9381 100644 --- a/src/test_demo.cc +++ b/src/test_demo.cc @@ -266,9 +266,9 @@ int main(int argc, char** argv) { audio_render_ahead(g_music_time, audio_dt * g_tempo_scale); }; - // Pre-fill audio buffer - g_audio_engine.update(g_music_time, 1.0f / 60.0f); - audio_render_ahead(g_music_time, 1.0f / 60.0f); + // Pre-fill using same pattern as main loop (100ms) + fill_audio_buffer(0.1f, 0.0); + audio_start(); g_last_audio_time = audio_get_playback_time(); |
