On 03/28, Stéphane Letz wrote:
>
> > Speaking of internal usage of min/max... checkDelayInterval() blindly
> > converts double to int, this looks dangerous and wrong. Honestly I do
> > not even know what int(HUGE_VAL+0.5) should return, but apparently the
> > result is negative because this code
> >
> > process = @(max(0));
> >
> > crashes faust (faustassert() in incOcc()).
> >
> > Oleg.
> >
>
>
> This is indeed a real issue, already reported here:
> https://github.com/grame-cncm/faust/issues/154
and I think there are more problems with overflows/conversions. Say,
process = @(100000000000000.0);
doesn't crash faust but the error message doesn't look right:
ERROR : possible negative values of : -2147483648
used in delay expression : IN[0]@-2147483648
interval(-2.14748e+09, -2.14748e+09)
I guess this is because of sigFixDelay() -> sigIntCast() which hits the
same double-to-int problem.
OTOH, this code
process = @(100000000000000);
compiles, but the cpp code is wrong:
float fVec0[536870912];
probably this is simply because atoi() used by the parser doesn't report an
error.
O just
process = 100000000000000;
this compiles to
output0[i] = FAUSTFLOAT(276447232);
without any warning. Not that I think this is the serious problem, but still.
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users