Skip to content

Playing the same sound several times requires allocating a new buffer each time #141

@Darksonn

Description

@Darksonn

I've been looking at the various Rodio sources for a while and I'm unable to find any sources that allow reusing a buffer of sound.

The closest solution appears to be using SamplesBuffer and cloning the vector each time, but this is inefficient as it requires an allocation and deallocation for each played sound.

I believe this crate should contain a source that wraps a vector of samples in an Arc, allowing the allocated memory to be reused.

I've attached a sample implementation of such a source: main.rs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions