playcanvas / playcanvas/engine

Pool sound instances instead of creating new ones every time a sound is played

Open
#502 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: sound enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.