From 295626c3d527613c93fa63e2b1f079704600a98e Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 28 Jan 2026 02:51:21 +0100 Subject: build: Finalize WebGPU integration and platform fixes Includes correct CMake configuration for GLFW native access, Objective-C++ compilation for the helper library on macOS, and applies clang-format to modified sources. --- src/audio/synth.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/audio') diff --git a/src/audio/synth.cc b/src/audio/synth.cc index 77a0d05..a4f3b7a 100644 --- a/src/audio/synth.cc +++ b/src/audio/synth.cc @@ -26,7 +26,8 @@ static struct { } g_synth_data; static Voice g_voices[MAX_VOICES]; -static volatile float g_current_output_peak = 0.0f; // Global peak for visualization +static volatile float g_current_output_peak = + 0.0f; // Global peak for visualization void synth_init() { memset(&g_synth_data, 0, sizeof(g_synth_data)); @@ -172,8 +173,8 @@ void synth_render(float *output_buffer, int num_frames) { output_buffer[i * 2 + 1] = right_sample; // Update the peak with the new max (attack) - g_current_output_peak = - fmaxf(g_current_output_peak, fmaxf(fabsf(left_sample), fabsf(right_sample))); + g_current_output_peak = fmaxf( + g_current_output_peak, fmaxf(fabsf(left_sample), fabsf(right_sample))); } } @@ -187,4 +188,6 @@ int synth_get_active_voice_count() { return count; } -float synth_get_output_peak() { return g_current_output_peak; } +float synth_get_output_peak() { + return g_current_output_peak; +} -- cgit v1.2.3