On 2015-11-18 21:31, Martin Peach wrote:
So I think I got it, it's in the latest svn revision. I hope it didn't break something else, but [packOSC] can now send messages triggered by its own output.
i had a quick glance at the code (didn't even try it out), but it seems you are mainly pushing the problem a little bit "back" rather than solving it. that is: the output of [packOSC] can trigger a *single* message that is feed back (via the stack) to it's own input. it is not possible to have that 2nd message trigger a feedback again.
i don't think it is valid to just dismiss the problem, simply because you (or I, for that matter) don't have an actual use case at hand (roman has come up with one that requires first-level recursion, though probably not deep recursion)
anyhow, i think the problem shouldn't be too hard to solve. afaics, the main issue is, that (for performance reasons) you use an intermediate "OSC buffer" that is allocated on the heap (and which will get overwritten in recursion). the solution is obviously to use a stack allocated buffer.
to keep the performance of a heap allocated buffer, i would suggest to:
this will make sure that a simple use of [packOSC] will be as fast as ever, while at the same time allowing "infinite" recursion (bound by the environment, not by [packOSC]) - albeit users of recursion will have to live with a small performance penalty.
fgmsdr IOhannes
¹ see my other mail on [unpackOSC]