Thanks for that. It also works up to a point but it's causing trouble as in the attached patch. The original message gets scrambled if its payload is not of the same type as the intervening message.
Also I find that bundles don't actually work. If you try to add another message to a bundle it fails: packOSC: According to the type tag (i) I expected more arguments. packOSC: Problem writing address. packOSC: According to the type tag I expected an argument of a different type. * Expected s, string now in packOSC: According to the type tag I expected an argument of a different type. * Expected s, string now in packOSC: usage error, write-msg failed. packOSC: According to the type tag (i) I expected more arguments. packOSC: Problem closing bundle. I'm not sure this ever worked or if got broken at some point. Bundles with one message are fine. Martin On Thu, Nov 19, 2015 at 4:53 AM, IOhannes m zmoelnig <[email protected]> wrote: > On 2015-11-19 09:49, IOhannes m zmoelnig wrote: > > to keep the performance of a heap allocated buffer, i would suggest to: > > - use the original scheme for an "immediate" (non-recursive) message > > - detect recursion, and if so, allocate buffers on the stack. > > attached is a patch that implements that. > the patch is against current HEAD, though i really worked on HEAD~1, so > it reverts a number of (imho unneccessary) things. > > it only touches functions that actually do output things (minus the > revert-last-commit), > > fgmaf > IOhannes >
#N canvas 570 226 672 538 10; #X declare -stdpath osc -stdpath mrpeach; #X obj 87 138 packOSC; #X obj 87 160 unpackOSC; #X msg 11 45 /trigger/osc/message now; #X obj 87 182 routeOSC /trigger/osc/message; #X obj 87 420 print SECOND; #X obj 258 420 print FIRST; #X obj 208 456 declare -stdpath osc -stdpath mrpeach; #X obj 344 480 import mrpeach; #X msg 368 97 [; #X msg 317 97 ]; #X msg 309 45 /a/bundle 99 54; #X obj 87 204 t a b b b b b; #X msg 32 66 /trigger/osc/message 77; #X msg 209 268 /i/am/reentrant whenever; #X msg 269 388 /i/am/reentrant last; #X msg 239 328 /i/am/reentrant medium; #X msg 224 298 /i/am/reentrant it; #X msg 254 358 /i/am/reentrant happens; #X msg 267 3 /trigger/osc/message bundlestyle; #X msg 288 24 /trigger/osc/message 999; #X msg 71 105 /trigger/osc/message now 77 again; #X msg 51 85 /trigger/osc/message 79 again; #X obj 317 70 t b a b b; #X msg 351 121 /more/stuff in here; #X floatatom 184 155 5 0 0 0 - - -, f 5; #X text 225 154 bundle depth; #X connect 0 0 1 0; #X connect 0 1 24 0; #X connect 1 0 3 0; #X connect 2 0 0 0; #X connect 3 0 11 0; #X connect 3 1 5 0; #X connect 8 0 0 0; #X connect 9 0 0 0; #X connect 10 0 22 0; #X connect 11 0 4 0; #X connect 11 1 14 0; #X connect 11 2 17 0; #X connect 11 3 15 0; #X connect 11 4 16 0; #X connect 11 5 13 0; #X connect 12 0 0 0; #X connect 13 0 0 0; #X connect 14 0 0 0; #X connect 15 0 0 0; #X connect 16 0 0 0; #X connect 17 0 0 0; #X connect 18 0 22 0; #X connect 19 0 22 0; #X connect 20 0 0 0; #X connect 21 0 0 0; #X connect 22 0 9 0; #X connect 22 1 0 0; #X connect 22 2 23 0; #X connect 22 3 8 0; #X connect 23 0 0 0;
_______________________________________________ Pd-dev mailing list [email protected] http://lists.puredata.info/listinfo/pd-dev
