playcanvas / playcanvas/engine
Pool sound instances instead of creating new ones every time a sound is played
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
This is for the new SoundComponent where each SoundSlot creates a new pc.SoundInstance (or pc.SoundInstance3d for 3d sounds) every time a new sound is played.
We could theoretically pool sound instances although one issue is the different type of instances depending on whether the sound is 3d or not.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names SoundComponent, SoundSlot, pc.SoundInstance, and pc.SoundInstance3d; start by locating where each slot creates instances and compare the 2D and 3D paths. Done means instances are reused through pooling for both sound types without changing playback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100