The size of the memory mapped file can now be a multiple of the buffer size. Not exactly the same as a delay, as the reader does not have to wait a defined number of buffers. But it can now fall behind a little and catch up (on average the reader should read as much as the writer writes as both run at the same sample rate). Can still lead to glitches, when the reader should coincidentally be faster than the writer sometimes. If it happens it wasn't obvious to me though - looks and sounds good now (cannot hear a difference between the "teleported" signal and the original one).
When teleporting the signal from Voltage Modular instance A to instance B and then back to instance A and subtracting the original signal from the twice-teleported one then they are not sample-identical. So there is a delay - which seems to stay constant though, the waveform of the subtracted signals doesn't change much. Looks ok on first sight!

- CrossTalk2.jpg (185.13 KiB) Viewed 6954 times
Ok, on second thought it is like a delay of random length (at some point the reader is initialized with pos 0 and starts iterating over the memory mapped file, same with the writer - but initialized sooner/later. As reader and writer have on average the same speed the delay (once determined) stays about constant.
In the screenshot the delay can be 0-999 samples. It also worked with 0-512 and mostly 0-256 samples - which indicates that the delay (random) is bigger than necessary most of the time atm (the bigger the file the more likely a long enough delay is chosen).
So it should be possible to come up with a better protocol that adds just as much delay as necessary...