[PD] mrpeach/binfile bang on done problem

Hans-Christoph Steiner hans at at.or.at
Thu Jul 23 20:32:13 CEST 2009


Hey Matrin and all,

We are here in Brazil hacking a srt file object for reading subtitles.
Your binfile has proven indispensible in this process since we need to
pass thru text to text3d without commas, etc being interpreted.  So big
thanks for that.

But there is one odd thing with it, and that's the way it bangs when its
done.  Its different than [textfile].  I was wondering if that was
deliberate.  Anyway, here's a patch to make it act like textfile.

Index: binfile.c
===================================================================
--- binfile.c	(revision 11724)
+++ binfile.c	(working copy)
@@ -233,10 +233,9 @@
     if (x->x_rd_offset < x->x_length)
     {
         c = x->x_buf[x->x_rd_offset++];
-        if (x->x_rd_offset == x->x_length)
outlet_bang(x->x_bang_outlet);
         outlet_float(x->x_bin_outlet, (float)c);
     }
-    else outlet_bang(x->x_bin_outlet);
+    else outlet_bang(x->x_bang_outlet);
 }
 
 /* The arguments of the ``list''-method


.hc





More information about the Pd-list mailing list