-
Notifications
You must be signed in to change notification settings - Fork 235
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
Remove the need to keep the stream around #613
Comments
Can Sink's output be not a stream but another source? Should they give some shared reference to the output stream in that case? I would keep sink as simple as possible unless there is a compelling reason to add anything to it. It is a lot harder to remove things from API than to add them. |
I am trying to prototype now to see how best to do this. |
Thats actually quite a nice idea. I wonder if there is any reason thats not the case right now... It seems quite elegant! |
How would it help out for this issue though? The stream still needs to be kept somewhere. And Sink is not really a footgun atm I rather not change it, Rodio has a ton of users depending on Sink in its current form. |
Just to note, i am working on this while creating a stream builder. |
Ahh good to hear, take your time to play around with it. Feel free open a (draft) PR once you want feedback. I had a quick look at a diff and saw some unrelated (I think?) changes (stuff with k == 0 in src/conversions/sample_rate.rs).
Comments explaining why you did things a certain way are invaluable for maintainers, both later on when the code needs to be changed/updated/fixed and during review. So that would be very nice :) If at all possible please split unrelated changes to different PR's, that makes them far easier to discuss and review. I can help out with that. |
Yes, some changes are unrelated, I will check that but they are mosly non-functional. I can trim the changeset down if that is a problem. The branch went through some experimentation so maybe some parts like method renames, may be omitted. |
More on |
That would be nice, it makes reviewing easier and there is less of a chance of a bug slipping through. |
strange, those tests should run in CI. Could you turn those changes into a separate PR? Then we can take a more detailed look at them and merge them. |
Test fixes alone #640 |
Addressed as part of #641 🥳 🎈 |
Its a common footgun in using rodio. It should be possible to store the stream in the sink.
Remaining questions, does the stream need to be accessible when a sink is used? If so how? Does sink get a method to get the stream?
Implementation wise it seems like storing the stream in an Arc will work.
The text was updated successfully, but these errors were encountered: