> Also [readsf~] supports threading and so do [udpsend] and [udpreceive], for obvious reasons involving system calls.
>> Can you guarantee that the revisions you've implemented generate the same output as Pd Vanilla, for all cases?
> I'd rather say it does not, in all cases. At the very least there is going to be a delay involved. But, if this brings to a different behaviour, yet still deterministic, would that be bad? After all, the above mentioned objects are not deterministic themselves, yet they are widely used, with a very high success rate.
udpsend and udpreceive are special cases because the protocol itself rules out the kind of determinism we're discussing.
So let's focus on readsf~ instead.
Suppose readsf~ is reading a sound file and outputs 3 blocks-- block 1, block 2, and block 3. The patch is outputting the sound file to the sound card, so we are
listening to the sound file as Pd is running.
Now, imagine this happens:
1st block: readsf~ perform routine finishes in time to output a block to the soundcard on schedule.
2nd block: perform routine takes longer to compute, and it misses the deadline set for the next block to be delivered to the soundcard. So we hear a dropout.
3rd block: perform routine finishes in time to meet the deadline.
Now, suppose we were debugging our patch by outputting each block of samples
to the console. Here's the question, then: what gets printed for the 2nd block?
Does Pd print out the samples from the sound file that missed the deadline, or
does it print out 64 zeroes?