[PD-dev] [PATCH] Avoid crash in vd~ for nan/inf input values
Kjetil Matheussen
k.s.matheussen at gmail.com
Tue Sep 10 20:01:48 CEST 2013
Sorry again, that patch was for tabread4~, which should work fine.
Trying again:
diff --git a/pure-data/src/d_delay.c b/pure-data/src/d_delay.c
index a6e5f7c..f22f7d7 100644
--- a/pure-data/src/d_delay.c
+++ b/pure-data/src/d_delay.c
@@ -271,7 +271,11 @@ static t_int *sigvd_perform(t_int *w)
t_sample zerodel = x->x_zerodel;
while (n--)
{
- t_sample delsamps = x->x_sr * *in++ - zerodel, frac;
+ t_sample inval = *in++;
+ if(!isfinite(inval))
+ inval = 0.0f;
+
+ t_sample delsamps = x->x_sr * inval - zerodel, frac;
int idelsamps;
t_sample a, b, c, d, cminusb;
if (delsamps < 1.00001f) delsamps = 1.00001f;
On Tue, Sep 10, 2013 at 4:49 PM, Kjetil Matheussen
<k.s.matheussen at gmail.com> wrote:
> Sorry, it seems like I've been sending html formatted mails. I thought
> I had turned
> that option off, but I guess it must have been turned on again after
> switching to a
> different machine.
More information about the Pd-dev
mailing list