Skip to content

Improve bevy::audio::Decodable documentation #6361

@harudagondi

Description

@harudagondi

How can Bevy's documentation be improved?

In Decodable, the documentation is very unclear, circular, and does not describe the actual functionality of the trait and its associated types.

Decodable is a type that can be converted to a rodio::Source type. It is usually paired with the Asset type from bevy_asset, and therefore must be Send, Sync, and implement TypeUuid. Generally this is raw sound data that can be converted to an iterator of samples.

Decodable::Decoder is an iterator of samples. In rodio, this is an iterator of u16, i16, and f32. See rodio::Source for more information.

Decodable::DecoderItem is simply an audio sample. It is usually u16, i16, or f32. See rodio::Sample for more information.

Decoder::decoder generates the iterator from the implementing type.

(Additionally, rodio::Source and rodio::Sample traits are not linked in the docs. To solve this, #5876 must be fixed)

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