AudioKit / AudioKitEX

C-backed AudioKit DSP
MIT License
49 stars 34 forks source link

Basic support for non-realtime effects #26

Closed silvansky closed 8 months ago

silvansky commented 1 year ago

Non-realtime effects like time stretching require pulling more or less frames from the source node to function properly. So I added this option to the internalRenderBlock by adding framesToPull function with default implementation that returns unchanged frame count:

virtual AUAudioFrameCount framesToPull(AUAudioFrameCount requestedOutputFrameCount) { return requestedOutputFrameCount; };

For all effects that use default implementation nothing changes.

silvansky commented 1 year ago

I'm gonna continue with non-realtime effects after https://github.com/AudioKit/AudioKit/pull/2861 .

silvansky commented 1 year ago

Added instantiate(nonRealTimeEffect code: String) func.