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

Feature Request: Be able to cancel a Seq #101

Open
duysqubix opened this issue Oct 11, 2023 · 2 comments
Open

Feature Request: Be able to cancel a Seq #101

duysqubix opened this issue Oct 11, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@duysqubix
Copy link
Contributor

Hello!

Beep has been fantastic to use. However I'm having some difficulty with the following situation.

I have a Seq of a StreamSeekCloser followed by a BeepCallback() to tell me when the audio file is done. Sometimes I'd like to stop streaming early, but If I close the StreamSeekCloser then my BeepCallback gets called.

I took a look at the implementation of Seq and it doesn't look like I can alter the items of the sequence after creation, which means I can't purposefully remove the BeepCallback() and then close the stream.

Would you be open to adding the ability to cancel a Seq which would cancel the current stream and then not run any of the other streams?

Thanks!

Original issue: faiface/beep#67

@MarkKremer
Copy link
Contributor

Related: #16

@MarkKremer MarkKremer added the enhancement New feature or request label Oct 11, 2023
@MarkKremer
Copy link
Contributor

It's possible to put a Ctrl around the Seq and set its Streamer property to nil before you close the StreamSeekCloser. That way no samples will be consumed and the callback won't be called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants