Configuration ​
config/config.lua sets NpAudio.Config. Changes to configuration require a
resource restart. Server resources can register cues, buses and scenes through
the API without editing core files.
Main controls ​
| Setting | Default | Purpose |
|---|---|---|
masterVolume |
1.0 |
Global factor for the built-in player |
categories |
sfx, music, dialogue, ambience, ui at 1.0 |
Local volume categories and their server-configured factors |
routingIntervalMs |
500 |
Server range/bucket/entity checks |
clientIntervalMs |
50 |
Listener and source gain/effect frames, batched into NUI |
idleIntervalMs |
750 |
Idle service wake interval |
clockIntervalMs |
30000 |
Client clock resampling |
rangeGrace |
5.0 |
Delivery margin beyond hearing range; does not make the sound audible farther away |
adminAce |
np_audio.admin |
Server command permission |
allowedHosts |
empty | Exact approved HTTPS hostnames |
Limits ​
limits field |
Default |
|---|---|
sources / sourcesPerOwner |
256 / 48 |
cuesPerOwner |
128 |
busesPerOwner / channelsPerOwner |
32 / 16 |
emitters / queue |
16 / 25 |
maxDistance |
1000 metres |
maxDurationMs |
21600000 (6 hours; also source retention ceiling) |
maxAssetBytes |
16777216 (16 MiB) |
maxActiveClient |
24 |
requests / requestWindowMs |
8 / 5000ms |
Additional registration bounds are documented in the API. Increase limits alongside profiling on the intended server population.
External audio ​
allowedHosts = { 'media.example.com' }
Use an exact public hostname, no wildcard. HTTP, IP literals, credentials,
custom ports, localhost and private .local hosts are rejected. Direct audio
must permit CORS and use a codec supported by FiveM's CEF. Administrator-approved
hosts and their redirects remain a trust decision; np_audio itself does not
fetch media on the server. Clients cannot supply a URL in a playback request.
Effects and adapters ​
effects.enabled defaults true. Wall probes use at most four checks per 400ms
pass; blocked, vehicle and water gain/lowpass defaults are editable.
Spatial audio describes the model.
integrations.xsound, integrations.interactSound and integrations.screens
are optional. Each has an editable resource name. screens.preferForMusic
defaults false, keeping music on the built-in player with np_audio's own
preferences and effects. Set it true to opt into automatic compatible host
delegation for approved URLs. See Integrations.