-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Expose symphonia features from rodio in bevy_audio and bevy #6388
Changes from 2 commits
af4401e
865258b
0d5f0f8
e50eb17
5908dfa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -39,6 +39,13 @@ | |||||||||||
|flac|FLAC audio format support. It's included in bevy_audio feature.| | ||||||||||||
|mp3|MP3 audio format support.| | ||||||||||||
|wav|WAV audio format support.| | ||||||||||||
|symphonia-aac|AAC audio format support by Symphonia.| | ||||||||||||
|symphonia-all|AAC, FLAC, MP4, MP3, Vorbis, WAV support by Symphonia.| | ||||||||||||
|symphonia-flac|FLAC audio format support by Symphonia.| | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice to have a short explanation of how this is different than the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do I put the explanation in this cargo_features file as well? Besides, AFAIK they are just different libraries. Both can be used to process audio files. A benefit I could think of using Symphonia is easily change audio formats used by games since it can probe the media source and decode accordingly instead of changing bunch of code when you need to change audio file from wav = hound to mp3 = minimp3. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bevy completely abstracts over the file loaded, so changing from wav to Flac would just mean changing the feature and the file extension. I would like to see in this file why someone would enable a feature, and I'm not sure "support by Symphonia" is enough of a difference with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Internally, rodio parses audio files using the following libraries:
Symphonia support parsing all of the mentioned file formats and more, however it is much "heavier" due to having support of more file formats. Therefore symphonia is not enabled by default. Symphonia is usually enabled if:
In this scenario, symphonia is just an implementation detail. Perhaps we can indicate that when enabling symphonia, they should disable other features to avoid redundancies. (also when you enable both As such, enabling all the aformentioned features plus Maybe the best thing to do is to link symphonia to its docs.rs page, and mention this comment (or put it) on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd be very happy to add a modified version of this comment to the feature list. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a few more info to chip in after researching a bit. On the codec And also over here, it seems |
||||||||||||
|symphonia-isomp4|MP4 audio format support by Symphonia.| | ||||||||||||
|symphonia-mp3|MP3 audio format support by Symphonia.| | ||||||||||||
|symphonia-vorbis|Vorbis audio format support by Symphonia.| | ||||||||||||
|symphonia-wav|WAV audio format support by Symphonia.| | ||||||||||||
|serialize|Enables serialization of `bevy_input` types.| | ||||||||||||
|wayland|Enable this to use Wayland display server protocol other than X11.| | ||||||||||||
|subpixel_glyph_atlas|Enable this to cache glyphs using subpixel accuracy. This increases texture memory usage as each position requires a separate sprite in the glyph atlas, but provide more accurate character spacing.| | ||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why expose this when there's another mp3 feature already? Same with wav and vorbis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Symphonia is an alternative backend to what rodio uses, which depends on the features used (flac = claxon, vorbis = lewton, wav = hound, mp3 = minimp3).
imo these features should be available because:
aac
andwav
) you'll have to compile both hound and symphonia. I think it's better as a user to just enable symphonia's wav feature instead of using hound to reduce compile times.