commit bd790842be2c8e4bb4fbfbf9382e3a7ec9c8dcb3
parent e18f3c2ac6beae12cd026fcfbcafdeacbaa2da25
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date: Mon, 30 Aug 2021 17:41:55 +0200
Fix the process logic for dc offset
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/examples/plugins/dc-offset/dc-offset.cc b/examples/plugins/dc-offset/dc-offset.cc
@@ -83,7 +83,7 @@ namespace clap {
processGuiEvents(process);
/* foreach frames */
- for (uint32_t i = 0; i < process->frames_count; ++i) {
+ for (uint32_t i = 0; i < process->frames_count;) {
/* check if there are events to process */
for (; nextEvIndex < evCount; ++nextEvIndex) {
@@ -123,6 +123,9 @@ namespace clap {
}
}
+ if (nextEvIndex == evCount)
+ N = process->frames_count;
+
/* Process as many samples as possible until the next event */
for (; i < N; ++i) {
float offset = offsetParam_->value();