Skip to content
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] - document file formats for bytes field of AudioSource #6619

Closed
wants to merge 9 commits into from
2 changes: 1 addition & 1 deletion crates/bevy_audio/src/audio_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{io::Cursor, sync::Arc};
#[derive(Debug, Clone, TypeUuid)]
#[uuid = "7a14806a-672b-443b-8d16-4f18afefa463"]
pub struct AudioSource {
/// Raw data of the audio source
/// Raw data of the audio source, which must be in one of the file formats supported by Bevy (wav, ogg, flac or mp3).
Copy link
Member

@harudagondi harudagondi Nov 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably indicate that this uses rodio::Decoder internally, which has specific functions compiled depending on the features enabled. This means that if there are certain features disabled (mp3, flac, and wav are disabled by default), then it would not work.

pub bytes: Arc<[u8]>,
}

Expand Down