stride3d / stride3d/stride

Lazy-load audio engine

Open
#2,628 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area-Audio enhancement
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Is your feature request related to a problem? Please describe.
The audio providers/components/etc. are always initialized in a game, even if all scenes don't have any audio component/listener.

Describe the solution you'd like
Have the audio system initialize on-demand (when it is first needed).

Describe alternatives you've considered
This behavior could be driven by a configuration option, where audio is

  • opt-out: in which case any attempt to initialize it would throw
  • lazy-load: initialized on first use
  • pre-load (current behavior): initialized at the start

Additional context
While rare, some games might not need any audio. Not initializing that part of the engine might save some memory and improve performance.

Another use case is when trying to run a game from WSL where audio is not supported by default. Granted, it is niche but very useful for developers to quickly test whether a game works correctly on Linux without requiring dual-boot or another machine.

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

No source files or tests are named. Start by locating where the audio providers, components, and listeners are initialized at game startup, then trace how audio is first used. Done means games without audio avoid initializing the audio system, while games that use audio initialize it on demand.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.