bevy_kira_audio
bevy_kira_audio copied to clipboard
Add Tween Options
Hey there!
Would you be open to a pull request that adds versions of the play
, stop
, etc. functions that additionally take the Tween
parameter present in kira
?
I was using my own wrapper around kira for Bevy, but would like to switch to this one and that looks like it's the only feature I'm missing.
I think we could re-export Tween
from kira
, but maybe rename it to AudioTween
, just to avoid confusion with any other Bevy tweening plugins or something like that.
I definitely want to support tweening and any help would be appreciated.
Maybe we can avoid duplicated methods and do something similar to entity commands? I am thinking of user code along the lines of
audio.play(handle).tween(my_tween);
That is a great idea that I hadn't thought of. That should be simple.
I think I'm going to need this soon and it should be simple to implement, so I'll probably have a PR for you in not too long.
While we're at it, do you think it makes sense to have a way to stop a specific sound, instead of stopping everything in a channel? I'm not sure if I'll need it, but that was another thing I had in my old audio plugin.
Yes, stop and other controls are planned on single instance handles (#53 ). If you have time for it, feel free to implement any of the controls.
I went ahead and implemented the discussed changes. I couldn't find a fork with commits from you, so I hope we didn't duplicate any work now.
Oh, no, I got caught up with other concerns and hadn't gotten to this yet. Thanks for adding the feature!