tesselode / kira

Library for expressive game audio.
https://crates.io/crates/kira
Apache License 2.0
837 stars 42 forks source link

Feature request: add support for m4a using symphonia-format-isomp4 #32

Closed ghost closed 1 year ago

ghost commented 1 year ago

As the title says, I am making an audio player using this, so it should be nice to have m4a support

tesselode commented 1 year ago

I'm curious, why did you choose Kira for an audio player?

ghost commented 1 year ago

rodio has no seeking support :(

tesselode commented 1 year ago

OK, I've thought about this issue a few times, and I'm still not sure if I want to add m4a support.

My main concern is that if I ever had to remove m4a support in the future (e.g. if symphonia stopped being maintained and I had to switch back to individual crates for each file format), it would be a breaking change. Kira isn't stable yet, so breaking changes aren't that big of a deal, but I'd still like to avoid them if I can.

Also, as far as I'm aware, most games don't use m4a. m4a support makes sense for an audio player, but that's not the use case Kira is designed for - it might have trouble with more advanced features like gapless playback (which I personally think is pretty important for an audio player).

That being said, m4a support would be easy to add, so it wouldn't add any maintenance burden in the short term. But it might add some maintenance burden later on, and I don't think it would benefit many people in the target audience of Kira.

Do you have any thoughts @beari22 ?

ghost commented 1 year ago

You can add m4a support as a feature flag? Noteing in docs that this feature may not be supported in the future. This well also make the crate smaller for ppl who are using this for games who don't want m4a support

tesselode commented 1 year ago

As it turns out, Kira has supported every file format Symphonia supports all along. If you add the appropriate Symphonia features to your Cargo.toml, Kira will automatically be able to load those file formats. This is documented now.