Skip to content
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

Add parameter to stop player_lsl when data was finished iterating #220

Closed
timonmerk opened this issue Mar 7, 2024 · 4 comments · Fixed by #223
Closed

Add parameter to stop player_lsl when data was finished iterating #220

timonmerk opened this issue Mar 7, 2024 · 4 comments · Fixed by #223
Labels
🌟 enhancement Proposed improvement or feature request. player Issues related to the Player API.
Milestone

Comments

@timonmerk
Copy link

First, many thanks for providing this super useful tool! The speed improvement over pylsl is really amazing!

I have a small discussion point. It would be great to provide a parameter to player_lsl that terminates the stream once it finishes running through the data once.

I think it would be simply terminating the stream once it passes this condition:

if stop <= self._raw.times.size:

Probably there were also good reasons to repeat the stream, but for offline and online equivalent analyses that would be a useful feature!

@mscheltienne
Copy link
Member

Sure, I removed this parameter/possibility at some point, but I can add it back if there is a need.
Does a n_repeat: Optional[int] = None argument sounds good to you, where None loops infintely, n_repeat = int loops the number of times requested (1 in your usecase)?

@timonmerk
Copy link
Author

That sounds great! Thanks!

@mscheltienne mscheltienne added this to the 1.3 milestone Mar 7, 2024
@mscheltienne mscheltienne added 🌟 enhancement Proposed improvement or feature request. player Issues related to the Player API. labels Mar 7, 2024
@mscheltienne
Copy link
Member

@timonmerk Released in 1.3.0 today!

@timonmerk
Copy link
Author

Thank you so much @mscheltienne , that was super fast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 enhancement Proposed improvement or feature request. player Issues related to the Player API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants