labstreaminglayer / liblsl-Matlab

Matlab bindings for liblsl
MIT License
36 stars 13 forks source link

vis_stream - Opening an inlet #37

Open sanobardar opened 11 months ago

sanobardar commented 11 months ago

I am getting the following errors while running _visstream('timerange',5) function in Matlab

Error using lsl_get_fullinfo An unknown error occurred.

Error in lsl_inlet/info (line 75) result = lsl_streaminfo(self.LibHandle,lsl_get_fullinfo(self.LibHandle, self.InletHandle, timeout));

Error in vis_stream (line 124) stream = create_streambuffer(opts,inlet.info());

I have loaded the lsl lib using: lib = lsl_loadlib(); build_mex

jesustorresdev commented 8 months ago

I think it is caused by a bug.

This https://github.com/labstreaminglayer/liblsl-Matlab/blob/master/mex/lsl_get_fullinfo.c#L18 should be:

int errcode = 0;

To avoid read garbage in errcode after call func().