I am having trouble understanding why this bug happens, but it is reproducible inso far as messing around in the same way produces similar results. I’ve attached a video here of the behaviour which is to do with disconnecting/connecting fluid.transients~ to a source. When I have transients~ connected to a play~ object it outputs nothing, but when I disconnect it it behaves as if its connected. It is literally opposite day in Max right now.
this is not reproducible here in Max7… but i do get a loud sinewave out of residual if I plug nothing in the audio input of it, which is another bug… let me try this in Pd and SC.
UPDATE1: SC does not do this, but that might be to do with object-optimisation in the Max wrapper… I’ll try Pd which I think might use the same but I remember something along the line that Pd does not know if something is plugged in or not… compiling the tip as I write this, stay tuned!
UPDATE2: Pd behaves, which points at Max wrapper. Thanks!
This revealed a more general problem, which is that if no processing happens (because the inlet is disconnected, so the client doesn’t bother itself), there was still junk in the output buffers from somewhere. I had thought that the Max API flag
Z_NO_INPLACE was meant to protect us from that, but it doesn’t seem to be. Maybe I’m not setting it right, or misunderstand it. @a.harker might be prepared to check my code and scoff at some point.
Anyway, I’ve pushed a fix sanitizing the output buffers.
Z_NO_INPLACE means just that - it means the input and output buffers don’t alias within a single object.
It doesn’t mean:
- those buffers don’t alias with other object’s IO
- those buffers are automatically zeroed
Hope this helps
There you go then, I did misunderstand it.