[PD] [PD-dev] What goes on during dsp ticks?
gr at grrrr.org
Sun Jun 15 00:15:28 CEST 2008
Am 14.06.2008 um 18:37 schrieb PSPunch:
> So, I've made a cache to copy the original signal to before
> Because the block size may change anytime, I am malloc & freeing a
> the size of the block on each DSP cycle.
> I hear that malloc is a "relatively" expensive task.
> Is it bad practice to run this each cycle, or is a kilobyte or two
> not a
> bid deal?
That's definitely bad practice.
Instead of that you can do the allocation in the "dsp" callback,
that's where you add your dsp processing to the signal chain. This
callback will be called anytime when either the block size or sample
rate changes or when the signal graph is rebuilt.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2407 bytes
Desc: not available
More information about the Pd-list