diff options
Diffstat (limited to 'src/audio/synth.cc')
| -rw-r--r-- | src/audio/synth.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/audio/synth.cc b/src/audio/synth.cc index d66c502..5fadf3c 100644 --- a/src/audio/synth.cc +++ b/src/audio/synth.cc @@ -43,7 +43,7 @@ static struct { static Voice g_voices[MAX_VOICES]; static volatile float g_current_output_peak = - 0.0f; // Global peak for visualization + 0.0f; // Global peak for visualization static float g_tempo_scale = 1.0f; // Playback speed multiplier #if !defined(STRIP_ALL) @@ -67,6 +67,10 @@ void synth_set_tempo_scale(float tempo_scale) { g_tempo_scale = tempo_scale; } +float synth_get_tempo_scale() { + return g_tempo_scale; +} + int synth_register_spectrogram(const Spectrogram* spec) { #if defined(DEBUG_LOG_SYNTH) // VALIDATION: Check spectrogram pointer and data @@ -201,7 +205,8 @@ void synth_trigger_voice(int spectrogram_id, float volume, float pan, v.buffer_pos = DCT_SIZE; // Force IDCT on first render v.fractional_pos = 0.0f; // Initialize fractional position for tempo scaling - v.start_sample_offset = start_offset_samples; // NEW: Sample-accurate timing + v.start_sample_offset = + start_offset_samples; // NEW: Sample-accurate timing v.active_spectral_data = g_synth_data.active_spectrogram_data[spectrogram_id]; |
