Ability to change AudioSource in AudioSink
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## 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.
Contributor guide
Research direction
Start by locating the AudioSink and AudioSource implementations and tracing how an audio entity begins playback. Determine how an existing AudioSink can accept a new source without recreating its entity, then verify that queued sounds, footsteps, gunshots, and other effects can reuse sinks as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- audio-video-rtc, game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100