On 06/07, Sébastien Clara wrote:
>
> Unfortunately, my code crashes during compilation and I do not know if my
> mistake comes from:

may be stack overflow due to infinite recursion,

> x = ba.if(gate==1,
>       par(i, nbMass, ba.if(i==int(nbMass/2),1,ba.take(i+1,x'))),
>       par(i, nbMass,
>               // Xi(n) = P1.Xi(n-1) + P2.[Xi-1(n-1) + Xi+1(n-1)] + P3.Xi(n-2) 
> + P4.f
>               ba.if(i==0,
>                       (p1*ba.take(i+1,x@ba.sec2samp(1/sr))) + 
> (p2*(ba.take(nbMass,x@ba.sec2samp(1/sr)) + ba.take(i+2),x@ba.sec2samp(1/sr))) 
> + (p3*ba.take(i+1,x@ba.sec2samp(2/sr))) + (p4*f),
>                       (p1*ba.take(i+1,x@ba.sec2samp(1/sr))) + 
> (p2*(ba.take(i,x@ba.sec2samp(1/sr)) + 
> ba.take((i+2)%(nbMass+1)),x@ba.sec2samp(1/sr))) + 
> (p3*ba.take(i+1,x@ba.sec2samp(2/sr))) + (p4*f)
>               )
>       )
> );

I have no idea what are you trying to do, but this code looks wrong in any case
or I am totally confused.

        ba.take(i+1,x@ba.sec2samp(1/sr))

looks doubly wrong. ba.take() doesn't make any sense to me, I fail to understand
what it should do. Say,

        process = par(i, 2, ba.take(i+1, 0));

is simply wrong and won't compile.

Also. x@ba.sec2samp(1/sr) refers to the same signal 'x' you are trying to 
define,
this can't work. For example,

        x = x@1;
        process = x;

leads to the endless evaluation cycle, and perhaps this explains the crash.

Oleg.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to