secondlife / secondlife/viewer

Small LLPluginClassMedia::setVolume optimization

Open
#6,002 0 comments 0 reactions 1 assignee View on GitHub

@akleshchev is already working on this.

Since Jul 15, 2026.

  • #6003 by @akleshchev — merged
enhancement stale
Dominant language
C++
Stars
299
Forks
146
Avg merge
1d 9h
Merged PRs (30d)
88

Description

Spatial/proximity media recalcualtes range and volume each frame for MediaRollOff implementation. When user is at 60 fps and moving forwards, spatial media around user updates volme 60 times per second. At 60 frames position barely changes, yet viewer generates 60 updates. Each update checks mutexes and sends the data via socket, which is pricey.

Filter out miniscule, inaudible volume changes.

Test Plan

Confirm media on a prim, a stream or an inventory sound (our audio engine calls the same LLPluginClassMedia::setVolume) that should fade in/our with distance correctly fades in/out.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.