From 62285542b341c101923a52c54a5088c6ee025948 Mon Sep 17 00:00:00 2001 From: Gordon JC Pearce Date: Thu, 5 Sep 2024 14:40:51 +0100 Subject: [PATCH] kind of inefficient --- plugin/chassis.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/chassis.cpp b/plugin/chassis.cpp index 29ce682..b162626 100644 --- a/plugin/chassis.cpp +++ b/plugin/chassis.cpp @@ -149,14 +149,16 @@ void Chassis::doMidi(const MidiEvent *ev, uint32_t count, uint32_t timelimit ) { void Chassis::run(const float **, float **outputs, uint32_t frames, const MidiEvent *midiEvents, uint32_t midiEventCount) { // if (midiEventCount > 0) printf("\n--------------------\n"); + uint32_t framePos; s.framesLeft = frames; while ( s.framesLeft != 0) { uint32_t sizeThisTime = (frames <= s.blockLeft)?frames:s.blockLeft; - printf("sL = %d bL = %d, calculating %d frames\n", s.framesLeft, s.blockLeft, sizeThisTime); + printf("sL = %d bL = %d, calculating %d frames at %d\n", s.framesLeft, s.blockLeft, sizeThisTime, framePos); + framePos += sizeThisTime; s.framesLeft -= sizeThisTime; s.blockLeft -= sizeThisTime; if (s.blockLeft == 0) { @@ -167,7 +169,7 @@ void Chassis::run(const float **, float **outputs, uint32_t frames, const MidiEv } if (s.framesLeft <= s.blockLeft) { s.blockLeft -= s.framesLeft; - printf("ended with %d frames, %d left in block\n", s.framesLeft, s.blockLeft); + printf("ended with %d frames at %d, %d left in block\n", s.framesLeft, framePos, s.blockLeft); s.framesLeft = 0; } };