Lag or loss of sync with jit.vcr, jit.record & sfrecord
Hello all,
I've been having a problem with a complex patch that records a video input (jit.grab) and mixes it with sound coming in from a sound card using jit.vcr. It's part of a video booth installation where recordings of 1-2 minutes of videos of people talking are done.
The patch runs well for about 20+ users, but around user 25 to 30, a loss of sync becomes noticeable between the recorded sound and the video. The actual files written on the hard drive present this loss of sync, not the Max playback.
The only way to get rid of this sync problem is to restart the computer / Max.
I was thinking it could be some kind of memory leak from the various objects (poke, jit.vcr, etc), but when I compared the memory usage at user1 vs user20, user25, there is no considerable difference.
Furthermore, a separate recording of the sound (sfrecord) and the video (jit.record) was tested, with a recombination on playback, and the lag still persists, which probably means that the problem is not in the recording process.
It's not "how long the patch has been running for", it "how many recording have been done / users have been through" that creates this out of sync problem. Meaning the thing can run for a whole day with a few users and it's fine. But one hour with plenty of users creates the problem, or a full day with the same amount of users.
We've tried updating the Max version to the latest 8, updating the OS to the latest on the Mac Mini M1, etc, to no avail.
I'm trying to figure out other ways to decompose the problem in order to find a solution.
Thanks in advance