Re: [PD-dev] Pointers changing/corrupting (used to be signal nan values)

2011-04-27 Thread Andrew Hassall
yeah I've checked all the arithmetic again, its all fine. Ok thanks, I may try that soon, but I have just found a problem with the pointers, I have a method where I create all the arrays, variables outlets etc. I'll need in the perform function, which is run when the object is created. (this is

Re: [PD-dev] Pointers changing/corrupting (used to be signal nan values)

2011-04-27 Thread IOhannes m zmoelnig
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2011-04-27 12:08, Andrew Hassall wrote: Anyone have any ideas why the pointer would change so dramatically? Is it being corrupted? if so any ideas what by? do you mind sharing the complete code? and an unrelated issue with your code: you

Re: [PD-dev] Pointers changing/corrupting (used to be signal nan values)

2011-04-27 Thread Andrew Hassall
No thats fine, I've attached both c files. (they are a bit messy at the moment due to debugging and tearing them apart sorry, if you need cleaner commented code I can comment it up no problem) will that mean that the list would be out of sync with the frames/blocks? because the list being

Re: [PD-dev] Pointers changing/corrupting (used to be signal nan values)

2011-04-27 Thread Andrew Hassall
also just a bit of information, contrary to what I said in a previous email, both files are now assuming no overlap, (to make it simpler for debugging). and there are lots of seemingly random posts, and outlet floats, again these are all for debugging. On Wed, Apr 27, 2011 at 12:17 PM, Andrew

Re: [PD-dev] Pointers changing/corrupting (used to be signal nan values)

2011-04-27 Thread IOhannes m zmoelnig
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2011-04-27 13:17, Andrew Hassall wrote: No thats fine, I've attached both c files. (they are a bit messy at the moment due to debugging and tearing them apart sorry, if you need cleaner commented code I can comment it up no problem) a quick

Re: [PD-dev] Pointers changing/corrupting (used to be signal nan values)

2011-04-27 Thread IOhannes m zmoelnig
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 some more comments, to fill in the gaps: On 2011-04-27 13:51, IOhannes m zmoelnig wrote: a quick glance at lpcanalysis_tilde_new() reveils, that you are allocating data on the stack (which will be freed as soon as you leave

Re: [PD-dev] Pointers changing/corrupting (used to be signal nan values)

2011-04-27 Thread Andrew Hassall
oh right didn't realise the bytes would be freed straight away, thank you so much! by creating variable in this form x-win=getbytes(x-winsize*sizeof(t_sample)); do you still refer to them in the same way as arrays e.g. *(win+10) to get value at index 10? Thanks!!! Andy On Wed, Apr 27, 2011 at

Re: [PD-dev] Pointers changing/corrupting (used to be signal nan values)

2011-04-27 Thread Andrew Hassall
When allocating memory with getbytes how do you refer to it as an array? I can't seem to set values in the allocated memory using *(mybytes+index) like normal. On Wed, Apr 27, 2011 at 1:27 PM, Andrew Hassall a.r.hass...@gmail.com wrote: oh right didn't realise the bytes would be freed straight

Re: [PD-dev] Pointers changing/corrupting (used to be signal nan values)

2011-04-27 Thread IOhannes m zmoelnig
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2011-04-27 18:09, Andrew Hassall wrote: When allocating memory with getbytes how do you refer to it as an array? I can't seem to set values in the allocated memory using *(mybytes+index) like normal. as long as you only have one-dimensional

Re: [PD-dev] Pointers changing/corrupting (used to be signal nan values)

2011-04-27 Thread Andrew Hassall
as long as you only have one-dimensional arrays, the 2 are exactly the same: a linear memory allocation. array is only how you chose to think of it. btw, normal is something very subjective, but i would access array elements as: mbytes[index] rather than *(mbytes+index) don't get me