Skip to content

Commit

Permalink
updated audio_source.rs documentation (#12765)
Browse files Browse the repository at this point in the history
# Objective
- Fixes #12677 

## Solution
Updated documentation to make it explicit that enabling the appropriate
optional features is required to use the supported audio file format, as
well as provided link to the Bevy docs listing the optional features.

Co-authored-by: Alice Cecile <[email protected]>
  • Loading branch information
Remi-Godin and alice-i-cecile authored Mar 28, 2024
1 parent 1619d42 commit c223fbb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/bevy_audio/src/audio_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ pub struct AudioSource {
/// Raw data of the audio source.
///
/// The data must be one of the file formats supported by Bevy (`wav`, `ogg`, `flac`, or `mp3`).
/// It is decoded using [`rodio::decoder::Decoder`](https://docs.rs/rodio/latest/rodio/decoder/struct.Decoder.html).
/// However, support for these file formats is not part of Bevy's [`default feature set`](https://docs.rs/bevy/latest/bevy/index.html#default-features).
/// In order to be able to use these file formats, you will have to enable the appropriate [`optional features`](https://docs.rs/bevy/latest/bevy/index.html#optional-features).
///
/// It is decoded using [`rodio::decoder::Decoder`](https://docs.rs/rodio/latest/rodio/decoder/struct.Decoder.html).
/// The decoder has conditionally compiled methods
/// depending on the features enabled.
/// If the format used is not enabled,
Expand Down

0 comments on commit c223fbb

Please sign in to comment.