exact video delay

I’d like to delay (about 3 seconds) a video stream from a webcam (jit.qt.grab) and to delay the incomming sound in sync at the same time in real time. I’m able to do it with jit.matrixset because in this case, the delay is not exact in time because it’s based on the frame delay and the frame rate is not constant…

I’ve found a way to do that. I use matrixset and I record the frame id of the video in the same audio buffer used to record the audio in a different channel. When I play the audio buffer, I grab the frame id of the video at the same time and I use it to drive the matrixset. So, the audio is always sync with the video. I’m not sure if my explanations are clear so I left the patch here…