-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Indicate steps in registering a new bevy::audio::Decodable type #6362
Copy link
Copy link
Closed
Labels
A-AudioSounds playback and modificationSounds playback and modificationC-DocsAn addition or correction to our documentationAn addition or correction to our documentation
Description
How can Bevy's documentation be improved?
Documentation for creating a new Decodable type is non-existent.
Here are the steps in creating a new Decodable type:
- Create a type (we'll call it
CustomAudio) that can be registered as anAssetand asDecodable. - Create a
Decodable::Decoderiterator type that generate samples. This must beSend, as this type will be sent to the audio thread. This also must implementrodio::Source. - Register the
Decodabletype (CustomAudio) as an asset in the app. - Initialize the
Audio<CustomAudio>resource inApp. - Initialize the
AudioOutput<CustomAudio>non-send resource. - Add the
play_queued_audio_system::<CustomAudio>function to thePostUpdatestage.
Congratulations, you now have a working audio type that can be played by bevy!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-AudioSounds playback and modificationSounds playback and modificationC-DocsAn addition or correction to our documentationAn addition or correction to our documentation