14 lines
601 B
Diff
14 lines
601 B
Diff
diff --git src/agran_oscillator.c src/agran_oscillator.c
|
|
index 6630215..3168469 100644
|
|
--- a/src/agran_oscillator.c
|
|
+++ b/src/agran_oscillator.c
|
|
@@ -421,6 +421,9 @@ create_grain_envelopes(unsigned long sample_rate)
|
|
env[e].data[Y_CONTROL_PERIOD + peak + i] = ampl;
|
|
env[e].data[Y_CONTROL_PERIOD + peak - i] = ampl;
|
|
}
|
|
+ if (env[e].length % 2 == 0) { /* if length is even, zero last frame of buffer */
|
|
+ env[e].data[Y_CONTROL_PERIOD + env[e].length - 1] = 0.0f;
|
|
+ }
|
|
}
|
|
break;
|