[PD] [PD-dev] What goes on during dsp ticks?
Thomas Grill
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
> processing.
>
> Because the block size may change anytime, I am malloc & freeing a
> cache
> 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.
gr~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2407 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20080615/ddb4ea58/attachment.bin>
More information about the Pd-list
mailing list