rodio
rodio copied to clipboard
add `Callback` source
this lets you execute code when the sink is empty, when you've reached a certain position in the sink, etc. it's useful if you can't/don't want to poll constantly to see if the sink has emptied
What is the status on this and could you provide an example of how to use it? I needed I can rebase it against master (looking at it it seems to be a trivial rebase).
using it here https://github.com/goolord/tundra/blob/c3e4515ad60b86739638952d93d9a50031162527/src/source/callback.rs https://github.com/goolord/tundra/blob/aa85b23e6fccde69fa6cba4dd1b6225c3079b1b9/src/types/player.rs#L256
feels ready to merge
bump, wasn't sure how useful this was but it appears that someone else has wanted it at least https://github.com/goolord/tundra/issues/3
@goolord it can easily be confused with a source that invokes a callback to generate samples and it was my first idea when I read this PR. I think it would be better to rename it to EmptyCallback
.