labstreaminglayer / liblsl-Matlab

Matlab bindings for liblsl
MIT License
37 stars 14 forks source link

Problem with input arguments number in lsl_wait_for_consumers() #30

Open nicoponf opened 2 years ago

nicoponf commented 2 years ago

Hello,

I have a problem with using the function wait_for_consumers of the outlet class. When I try to use it, I get the following error: " Error using lsl_wait_for_consumers 2 input argument(s) required.

Error in lsl_outlet/wait_for_consumers (line 128) success = lsl_wait_for_consumers(self.LibHandle,self.OutletHandle,timeout); "

This error seems to come from the following line in the C file for the mex interface: https://github.com/labstreaminglayer/liblsl-Matlab/blob/8fe8431b30c12bdde67a2277b5ac27a2fea4931c/mex/lsl_wait_for_consumers.c#L19 It could be that only these 2 lines should be changed to accepting 3 arguments instead of 2, but I am not too sure.

cboulay commented 2 years ago

You're probably right. This is a rarely used function so it might be a longstanding undetected bug. Please change it in a manner that works for you then consider submitting a pull request.