Stop using private variables in virtual functions please!

Just that there is no looping/multiple calling of the delegate within the GeneratePCMData function itself, which is how it sounded to me from the way you phrased it, but anyway just a misunderstanding I think.

Okay this is great. Not sure to what degree this is new behaviour, or if I somehow just convinced myself it didn’t work this way when in fact it always did. Anyway, doesn’t really matter now.

Yep, the guy I’m writing the plugin for made this point, which is why we were surprised that (so far as we thought, apparently wrongly) it couldn’t be reduced. I agree some renaming of a few parameters could help to improve understanding of the code.

As for the redundancy comment, I was referring just to these lines. Unless I’m losing the plot, line 67 will always just evaluate to SamplesToGenerate; it’s not possible for SamplesAvailable to be smaller otherwise the if clause wouldn’t have been entered. I’m guessing you added the if statement later, rendering the FMath::Min redundant when previously it was needed.

Finally - any rough ETA on the new backend?