You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grouping a couple errors together so I only have to create 1 PR.
Problem 1:
Since e8817c0, if the sleep duration (default 5 msec) is shorter than the time between two samples in any of the streams, stop_idx will not be larger than start_idx and all_streams_exhausted will remain True, causing the loop to exit and terminate playback prematurely.
I think the solution is for the streams-exhausted check to be based on (1) looping disabled and (2) the streams' time ranges. This will probably require some new state variables.
Problem 2:
From the playback entry point, one of the arguments to LSLPlaybackClock is loop_time=wrap_dur if loop else None, and this value gets assigned to self._boundary. However, the clock's t0 property tries to do self._n_loop * self._boundary which doesn't work when loop is False and therefore self._boundary is None.
The easy solution is to fix the argument to be loop_time=wrap_dur if loop else 0.0, which is probably the correct solution (vs fixing t0 property) because the loop_time annotation is non-optional float.
The text was updated successfully, but these errors were encountered:
Grouping a couple errors together so I only have to create 1 PR.
Problem 1:
Since e8817c0, if the sleep duration (default 5 msec) is shorter than the time between two samples in any of the streams,
stop_idx
will not be larger thanstart_idx
andall_streams_exhausted
will remainTrue
, causing the loop to exit and terminate playback prematurely.I think the solution is for the streams-exhausted check to be based on (1) looping disabled and (2) the streams' time ranges. This will probably require some new state variables.
Problem 2:
From the playback entry point, one of the arguments to
LSLPlaybackClock
isloop_time=wrap_dur if loop else None
, and this value gets assigned toself._boundary
. However, the clock'st0
property tries to doself._n_loop * self._boundary
which doesn't work whenloop
isFalse
and thereforeself._boundary
isNone
.The easy solution is to fix the argument to be
loop_time=wrap_dur if loop else 0.0
, which is probably the correct solution (vs fixingt0
property) because theloop_time
annotation is non-optionalfloat
.The text was updated successfully, but these errors were encountered: