diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-28 09:34:29 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-28 09:34:29 +0100 |
| commit | 7631eaa56df1aea834998e9ce829bfb5937cdfdc (patch) | |
| tree | 7aaaef0de78a9a266abda4a8f5f608183a435195 /src | |
| parent | 302d883f34864bc66a5e04532ae27d7e89fd94e8 (diff) | |
docs: Update project context and session notes
Summarizes recent implementations including Asset Management, audio/visual fixes, and style improvements.
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio/synth.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/audio/synth.cc b/src/audio/synth.cc index 8380301..2242d5c 100644 --- a/src/audio/synth.cc +++ b/src/audio/synth.cc @@ -35,7 +35,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)); @@ -183,9 +184,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))); } } @@ -199,4 +199,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; +} |
