diff --git a/src/main.c b/src/main.c index 74e8d5e..f63bfe1 100644 --- a/src/main.c +++ b/src/main.c @@ -299,6 +299,8 @@ static int audioCallback(float **inputBuffer, float **outputBuffer, unsigned lon if (audio_thread_state == FAS_AUDIO_DO_PAUSE) { last_gain_lr = curr_synth.settings->gain_lr; + curr_synth.lerp_t = 0.0; + audio_thread_state = FAS_AUDIO_PAUSE; } else if (audio_thread_state == FAS_AUDIO_DO_PLAY) { curr_synth.lerp_t = 0.0; @@ -322,6 +324,8 @@ static int audioCallback(float **inputBuffer, float **outputBuffer, unsigned lon last_gain_lr = curr_synth.settings->gain_lr; + curr_synth.lerp_t = 0.0; + audio_thread_state = FAS_AUDIO_PAUSE; }