[PD-cvs] externals/mrpeach/osc unpackOSC.c,1.4,1.5

Martin Peach mrpeach at users.sourceforge.net
Wed Jul 11 22:38:39 CEST 2007


Update of /cvsroot/pure-data/externals/mrpeach/osc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12935

Modified Files:
	unpackOSC.c 
Log Message:
Added handler for blob type.


Index: unpackOSC.c
===================================================================
RCS file: /cvsroot/pure-data/externals/mrpeach/osc/unpackOSC.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** unpackOSC.c	11 Jul 2007 17:34:38 -0000	1.4
--- unpackOSC.c	11 Jul 2007 20:38:37 -0000	1.5
***************
*** 353,356 ****
--- 353,372 ----
          switch (*thisType)
          {
+             case 'b': /* blob: an int32 size count followed by that many 8-bit bytes */
+             {
+                 int i, blob_bytes = ntohl(*((int *) p));
+ #ifdef DEBUG
+                 post("blob: %lu bytes", blob_bytes);
+ #endif
+                 p += 4;
+                 for (i = 0; i < blob_bytes; ++i, ++p, ++myargc)
+                     SETFLOAT(mya+myargc,(*(unsigned char *)p));
+                 while (i%4)
+                 {
+                     ++i;
+                     ++p;
+                 }
+                 break;
+             }
              case 'i': case 'r': case 'm': case 'c':
  #ifdef DEBUG





More information about the Pd-cvs mailing list