Hi,

I could try to make a deken version so you can test the latest fixes :-)
of which the patch is included.

The fix has two parts:
- The quick hack is to prevent a crash when perform is called while no
array is present and no IR partitions are prepared (x->ir_prepared == 0).
- The resets of x->ir_prepared ensure for each exit of partconv_set the
current state of the array is always correct.

But the fixes will end up in the pd-iem version soon, that is the
preferred option.

The patch will end up in SourceForge (as patch) when it becomes
available again.

Greetings,

Fred Jan


On 2015-07-20 09:02 PM, IOhannes m zmölnig wrote:
> On 07/20/2015 08:47 PM, Matthias Blau wrote:
>> Hello all,
>>
>> now that so many partconv~ experts are active here, I would like to take
>> the occasion to ask whether somebody have a version (even in its current
>> imperfect state from SVN) working on Windows 7 or 8? Or alternatively,
>> an easy-to-follow compilation recipe?
> 
> pd-iem includes the "bsaylor" lib (actually mainly to include [partconv~])
> 
> it's not dekenized yet, but you can grab a zip-file containing
> pre-compiled binaries for w32 from
>  https://github.com/iem-projects/pd-iem/releases
> 
> fgadfm
> IOhannes
> 
> 
> 
> _______________________________________________
> [email protected] mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
> 
Index: bsaylor/partconv~.c
===================================================================
--- bsaylor/partconv~.c	(revision 17424)
+++ bsaylor/partconv~.c	(working copy)
@@ -149,6 +149,13 @@
 	float *sumbuf1ptr;
 	float *sumbuf2ptr;
 
+	// hack to prevent usage of unititialized ir array
+	if (x->ir_prepared == 0) {
+		for (i = 0; i < n; i++)
+			out[i] = 0.f;
+		return (w+5);
+	}
+    
 	memcpy(&(x->inbuf[x->inbufpos]), in, n*sizeof(float));  // gather a block of input into input buffer
 	x->inbufpos += n;
 	if (x->inbufpos >= x->partsize) {
@@ -261,10 +268,12 @@
 	if ( ! (arrayobj = (t_garray *)pd_findbyclass(x->arrayname, garray_class))) {
 		if (*x->arrayname->s_name) {
 			pd_error(x, "partconv~: %s: no such array", x->arrayname->s_name);
+			x->ir_prepared = 0;
 			return;
 		}
 	} else if ( ! garray_getfloatwords(arrayobj, &arraysize, &array)) {
 		pd_error(x, "%s: bad template", x->arrayname->s_name);
+		x->ir_prepared = 0;
 		return;
 	}
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to