wait_for_consumers is wrong
dmedine opened this issue · comments
While rewriting the wrapper I noticed that this is wrong:
https://github.com/labstreaminglayer/liblsl-Csharp/blob/master/LSL.cs#L498:
public bool wait_for_consumers(double timeout = LSL.FOREVER) { return dll.lsl_wait_for_consumers(obj) > 0; }
should be
public bool wait_for_consumers(double timeout = LSL.FOREVER) { return dll.lsl_wait_for_consumers(obj, timeout) > 0; }
and then
https://github.com/labstreaminglayer/liblsl-Csharp/blob/master/LSL.cs#L1025-L1026:
DllImport(libname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)]
public static extern int lsl_wait_for_consumers(IntPtr obj);
should be
[DllImport(libname, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, ExactSpelling = true)]
public static extern int lsl_wait_for_consumers(IntPtr obj, double timeout);
Small detail but as of now, the lib will always call lsl_wait_for_consumer
with a forever timeout.
Good catch, could you open a PR for this or push this directly?
Merged, thanks for taking care of this :-)