Skip to content

Indicate steps in registering a new bevy::audio::Decodable type #6362

Closed

Description

@harudagondi

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:

  1. Create a type (we'll call it CustomAudio) that can be registered as an Asset and as Decodable.
  2. 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.
  3. Register the Decodable type (CustomAudio) as an asset in the app.
  4. Initialize the Audio<CustomAudio> resource in App.
  5. Initialize the AudioOutput<CustomAudio> non-send resource.
  6. 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

  1. added
    C-DocsAn addition or correction to our documentation
    S-Needs-TriageThis issue needs to be labelled
    on Oct 25, 2022
  2. added
    A-AudioSounds playback and modification
    and removed
    S-Needs-TriageThis issue needs to be labelled
    on Oct 25, 2022
  3. dis-da-mor commented on Nov 16, 2022

    @dis-da-mor
    Contributor

    working on this.

  4. moved this from Open to In Progress in Audio (Old)on Nov 17, 2022
  5. added a commit that references this issue on Jan 17, 2023
    0df67cd
  6. moved this from In Progress to Done in Audio (Old)on Jan 17, 2023
  7. added a commit that references this issue on Jan 22, 2023
    4ef9d6b
  8. added a commit that references this issue on Feb 1, 2023
    688e932
  9. added a commit that references this issue on Mar 4, 2023
    76b8829
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AudioSounds playback and modificationC-DocsAn addition or correction to our documentation

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions