[PD-dev] dynamically allocate memory for object structure component

Jonathan Wilkes jancsika at yahoo.com
Sun Sep 14 17:20:25 CEST 2014


Yes, I see: sys_getblksize

in m_pd.h.

It looks to be hard-coded to return 64.

Of course the block size for a subpatch can be changed with [block~].  I'm not totally comfortable with the dsp operations yet, but it looks like that block size is what is represented by the member s_n of t_signal.  But one of the dsp gurus should probably confirm or deny that. :)


-Jonathan



On Sunday, September 14, 2014 5:18 AM, Alexandros Drymonitis <adrcki at gmail.com> wrote:
 


I writing an external where I want to declare some arrays in the object structure which will have the size of the block size. I want to allocate memory using malloc with a variable that gets the block size. I know it's possible to get the sample rate with sys_getsr(); which can be used in the new instance routine. Is there something similar that gives you the block size?

_______________________________________________
Pd-dev mailing list
Pd-dev at lists.iem.at
http://lists.puredata.info/listinfo/pd-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20140914/435f3344/attachment-0001.html>


More information about the Pd-dev mailing list