You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Indicate steps in registering a new bevy::audio::Decodable type #6362
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 an Asset and as Decodable.
Create a Decodable::Decoder iterator type that generate samples. This must be Send, as this type will be sent to the audio thread. This also must implement rodio::Source.
Register the Decodable type (CustomAudio) as an asset in the app.
Initialize the Audio<CustomAudio> resource in App.
Initialize the AudioOutput<CustomAudio> non-send resource.
Add the play_queued_audio_system::<CustomAudio> function to the PostUpdate stage.
Congratulations, you now have a working audio type that can be played by bevy!
Activity
dis-da-mor commentedon Nov 16, 2022
working on this.
Add `AddAudioSource` trait and improve `Decodable` docs (#6649)
Add `AddAudioSource` trait and improve `Decodable` docs (bevyengine#6649
Add `AddAudioSource` trait and improve `Decodable` docs (bevyengine#6649
Squashed commit of the following: