-
Notifications
You must be signed in to change notification settings - Fork 46
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 audio events #97
Comments
Do you have any thoughts on how such a feature should be designed? I've had some thoughts, but I'm curious to hear what other people think. |
I think you have a way better understanding of how this all works, I do not have a lot of Rust experience, but for me a solution like in rodio would be fine: That would not work for "end of loop" events though, but I guess a simple A little off-topic, but in the end I would prefer gapless playback, but I guess that is not the priority of a gaming audio library. But since Symphonia supports it already, it might not be too much work? |
Having audio events of some sort would be dope since it could allow e.g. granting a temporary track and dispose / re-attribute it once sounds are finished being played, or simply getting rid of |
What do you mean by getting rid of a sound handle? Dropping it? |
Ok I must warn that my use-case is a bit niche: I use So, long story short, I conditionally detour calls to the native audio system and, when asked to play custom sounds, I redirect and play them with kira instead. This forces me to keep kira's sounds handle around in some Of course there are other situation where having audio events would allow pretty cool features (even better: audio events based callbacks). For example it could allow building dialogs by chaining sounds one after another whenever they are finished playing. Or whatever you can think that requires knowing the current state of play of any given sound, I'm pretty sure there's way more use cases than mine that I cannot think of right now. Since this necessarily requires some overhead in kira, it could probably be gated behind an optional feature flag, but I think it would be a nice addition @tesselode. |
Is it possible to play a sound right after another sound ended playing (e.g. song ended, play next song)?
I just need an end event, but obviously other events might be useful too (start, stop, pause, loop, etc.).
The text was updated successfully, but these errors were encountered: