liblsl-Matlab icon indicating copy to clipboard operation
liblsl-Matlab copied to clipboard

Problem with input arguments number in lsl_wait_for_consumers()

Open nicoponf opened this issue 3 years ago • 1 comments

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.

nicoponf avatar Nov 27 '21 06:11 nicoponf

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.

cboulay avatar Nov 27 '21 20:11 cboulay