-
Notifications
You must be signed in to change notification settings - Fork 247
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
This adds long term goals for rodio #654
base: master
Are you sure you want to change the base?
Conversation
Rodio has existed for about 9 years. When it was written there where no audio libraries for rust. Therefore rodio can do everything but not everything perfectly. A lot has changed since then and new libraries have popped up for specific goals such as game-audio (kira) & digital signal processing. This is a good thing in my opinion, when developing a library you have to make choices and they exclude some use cases. When I started maintaining rodio I had a short exchange with the bevy devs (1/3 of rodio downloads are from bevy) about their planned move from rodio to kira. Note the have not migrated to kira as of this writing. See bevyengine/bevy#9076 (comment) I also had a short exchange with the kira dev to see if kira could support all audio usecases, that seems to not be the case. See: tesselode/kira#87 Over the past few weeks we have collected the use-cases for rodio, see issue #626. After talking to the bevy dev and kira dev I made some goals for rodio in my head. Now that rodio is (very) actively maintained we need to write those down and discuss them. That way we do not make contradicting decisions in rodio. Please let me know what you think.
As someone who has an actively developed music app, there is only one more thing that I'm hoping to get out of rodio, which in my comment i mentioned the problem of being unable to apply a crossfade-like effect to my music. Again, I don't have a lot to offer in terms of implementation, but I would be open to discussing potential idea / brainstorming how this could work. Since I consider how I built my app to be a golden standard for how music apps should work. (All music is in one big vec, and songs are chosen at random, or in order). I would be happy to do a breakdown of my implementation and how it works with the rest of the app. I would assume it would be pretty helpful to people making a similar app. My implementation is in iced, but it could be broken down in a way where it could be applied to more gui / tui apps in a general sense. I also wouldn't mind doing tutorials / docs for general use-cases. Things for the average user. |
Regarding that Bevy thread. Yes, Rodio is bound to CPAL, although only real dependency is in output stream. |
I would maybe also clarify if rodio aspires to be more portable or cpal remains a requirement. |
When that was written I was only maintaining rodio for short while. The same is true when I asked the Kira dev whether Kira could support all playback use-cases. Now, one year later, I have my doubts whether game-audio and general playback are really separate use cases that need specialist libraries. Looking at the arguments made:
I wonder if they investigated the overhead of Kira's audio pipeline. My guess is Kira does something like apply a
As far as I know that is always the case, the OS can always decide to deschedule your thread. You can influence it and maybe that's something kira does, but on most systems to get realtime perf you need a very special kernel and sudo/admin rights.
You can do that in rodio too however it might be more cumbersome?
This is
We do not have an API like that. I can think of a rough way to implement it right now but Kira, being purpose build for this, might have a better answer. |
Cpal is pretty portable right? Though I would love to get rid of the dependency of libasound-dev we have through cpal since that makes crosscompiling a chore. It might be worth it decoupling us from it. |
using
It is and yes they do (at least I do), on mobile low power devices every bit of cpu you take is battery life. Users tend to listen to audio for hours on end so a small difference in perf is noticeable. Footnotes |
I did not know about Kira before. Looking through its documentation, I also have the feeling it would fit.
From Picking up from #626, I use Rodio as cross-platform, fire & forget audio playback library. Only DSP I use are volume attenuation and AGC - although I'd like to use fades more easily as I'll point out below. Integrating Rodio more tightly in
Again, technically I understand, but here I can think we could find a more ergonomic interface from the point of view of "maintaining a playlist" and applying DSP not only on individual sources, but on the audio output.
|
Thank you very much for your detailed points both here and in the user stories thread. I agree with everything you said, and as I see it should all be doable 🎉. Some things should already work so those are bugs, others fit best in a new Player struct that would replace Sink (planned), and yet others will need some new Sources or additions to the Source trait. Feel free to open issues for all of these if they do not exist yet then we can discuss the details there. |
Rodio has existed for about 9 years. When it was written there where no audio libraries for rust. Therefore rodio can do everything but not everything perfectly. A lot has changed since then and new libraries have popped up for specific goals such as game-audio (kira) & digital signal processing. This is a good thing in my opinion, when developing a library you have to make choices and they exclude some use cases.
When I started maintaining rodio I had a short exchange with the bevy devs (1/3 of rodio downloads are from bevy) about their planned move from rodio to kira. Note the have not migrated to kira as of this writing. See bevyengine/bevy#9076 (comment)
I also had a short exchange with the kira dev to see if kira could support all audio usecases, that seems to not be the case. See: tesselode/kira#87
Over the past few weeks we have collected the use-cases for rodio, see issue #626.
After talking to the bevy dev and kira dev I made some goals for rodio in my head. Now that rodio is (very) actively maintained we need to write those down and discuss them. That way we do not make contradicting decisions in rodio.
Please let me know what you think.