Skip to content

playback_lsl errors #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cboulay opened this issue May 8, 2025 · 0 comments · May be fixed by #136
Open

playback_lsl errors #135

cboulay opened this issue May 8, 2025 · 0 comments · May be fixed by #136
Assignees

Comments

@cboulay
Copy link
Contributor

cboulay commented May 8, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant