Skip to content

Ability to change AudioSource in AudioSink #12824

Open
@Aunmag

Description

@Aunmag

What problem does this solve or what need does it fill?

For better performance I try to limit amount of audio sources and spawn a few audio sinks at startup once. I've implement a queue for sounds that need to be played with priority and it checks if there's available audio sink. The problem is that I sill need to spawn/despawn entity with audio bundle for each sound.

What solution would you like?

I need an ability to reuse an existing AudioSink for playing new sounds without recreating it.

What alternative(s) have you considered?

None

Additional context

In my case I play a lot of footsteps sounds for player and enemies, when there are more than 200 enemies it may affect the performance. Plus gunshots and other audio effects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AudioSounds playback and modificationC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    Status

    Open

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions