-----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 glance at lpcanalysis_tilde_new() reveils, that you are allocating data on the stack (which will be freed as soon as you leave lpcanalysis_tilde_new()!), store their addresses and re-use them later (when the memory is already freed).
you cannot do: <ko> void*lpca_new() { //... t_sample winlis[2088]; x->win=winlis; //... } </ko>
instead you have to do: <ok> void lpca_free(x) { freebytes(x->win); //... } void*lpca_new() { //... x->win=getbytes(2088*sizeof(t_sample)); //... } </ok>
mfgasdr IOhannes