From 1016d65d4b5bf7cbd05bba4cf79dc2ce172c9fad Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 31 Jan 2026 15:47:33 +0100 Subject: opt: Guard debug/seek features with STRIP_ALL Ensures that code related to the --seek command line option (simulation loops, silent audio rendering) is completely compiled out when the DEMO_STRIP_ALL build option is enabled, preserving the 64k size constraint. --- src/audio/audio.cc | 2 ++ src/audio/audio.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/audio') diff --git a/src/audio/audio.cc b/src/audio/audio.cc index 517e376..a1a6f7b 100644 --- a/src/audio/audio.cc +++ b/src/audio/audio.cc @@ -48,6 +48,7 @@ void audio_start() { } } +#ifndef STRIP_ALL void audio_render_silent(float duration_sec) { const int sample_rate = 32000; const int chunk_size = 512; @@ -60,6 +61,7 @@ void audio_render_silent(float duration_sec) { total_frames -= frames_to_render; } } +#endif void audio_update() { } diff --git a/src/audio/audio.h b/src/audio/audio.h index 67c83c2..1fb53b6 100644 --- a/src/audio/audio.h +++ b/src/audio/audio.h @@ -6,6 +6,8 @@ void audio_init(); void audio_start(); // Starts the audio device callback +#ifndef STRIP_ALL void audio_render_silent(float duration_sec); // Fast-forwards audio state +#endif void audio_update(); void audio_shutdown(); -- cgit v1.2.3