diff options
author | Martin Peach <mrpeach@users.sourceforge.net> | 2007-07-11 20:38:37 +0000 |
---|---|---|
committer | Martin Peach <mrpeach@users.sourceforge.net> | 2007-07-11 20:38:37 +0000 |
commit | 1e6df0a45bde37e2174b4611438d2c1de5a2c17a (patch) | |
tree | 4ec5c8c6e846a7af2b0497d580921dae75b1d041 /osc | |
parent | b6ed6bb1831802c67408b610715ea1501ea10d6d (diff) |
Added handler for blob type.
svn path=/trunk/externals/mrpeach/; revision=8027
Diffstat (limited to 'osc')
-rwxr-xr-x | osc/unpackOSC.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/osc/unpackOSC.c b/osc/unpackOSC.c index 6a6274d..0cf3258 100755 --- a/osc/unpackOSC.c +++ b/osc/unpackOSC.c @@ -352,6 +352,22 @@ static void unpackOSC_PrintTypeTaggedArgs(t_unpackOSC *x, void *v, int n) { 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 post("integer: %d", ntohl(*((int *) p))); |