LSL4Unity Latency

Come here to discuss about OpenViBE in general!
Post Reply
mhadji05
Posts: 53
Joined: Tue Mar 16, 2021 9:37 am

LSL4Unity Latency

Post by mhadji05 »

Hello,

I am trying to develop a BCI application using OpenVibe and Unity.
I send markers to Unity via LSL, but it seems there is a latency around 700-800ms and this can be a problem with system accuracy.
Is there anything I can do to eliminate the latency from the Openvibe to Unity?

Thanks in advance.

Thibaut
Posts: 264
Joined: Wed Oct 31, 2018 9:14 am

Re: LSL4Unity Latency

Post by Thibaut »

Hi,
I haven't this latency. So I can't say where is the problem.^^
THe only time I have this latency is when I communicate with other protocol (for example with arduino) and the answer was you must flush buffer but LSL example make that alone.
Thibaut

mhadji05
Posts: 53
Joined: Tue Mar 16, 2021 9:37 am

Re: LSL4Unity Latency

Post by mhadji05 »

I use the arduino-based OpenBCI board and the Unity HelloWorld example (gitlab).
I receive the markers from the StimulationInlet .cs (see below).

Code: Select all

public class StimulationInlet : OVIntInlet
{
          protected override void Process(int[] input, double time)
	  {
          }
}
Unfortunately, I receive for example, the stimulation code:769 around 700ms after the presented left arrow in the Openvibe.
Ιs there any strategy in this?

Thibaut
Posts: 264
Joined: Wed Oct 31, 2018 9:14 am

Re: LSL4Unity Latency

Post by Thibaut »

Hi,
When I got bothered with arduino. I did a lot of tests, among other things, sent a burst of information to see what exactly he received and when. and I tested different methods to forcibly flush the buffer.
Thibaut

mhadji05
Posts: 53
Joined: Tue Mar 16, 2021 9:37 am

Re: LSL4Unity Latency

Post by mhadji05 »

Is there a chance the Process() function in Unity late to get the markers?

Code: Select all

public class StimulationInlet : OVIntInlet
{
          protected override void Process(int[] input, double time)
	  {
          }
}

Thibaut
Posts: 264
Joined: Wed Oct 31, 2018 9:14 am

Re: LSL4Unity Latency

Post by Thibaut »

Technically no

Post Reply