All products

np_audio

Sound cues for the world, music for the venue, and listening controls for each player. Place a speaker, attach an alarm to a vehicle, or fade between two decks through one owned audio API.

v1.0.0StandaloneOneSyncFor developers
Price TBAStore link follows at release
DocumentationAPI
Version
1.0.0 · API 1
Framework
Standalone; works alongside ESX, qbx and qb
Dependencies
OneSync; no database or third-party audio library required
Player controls
Master/category levels, mute and streamer mode
Validation
35 automated checks and browser playback pass; live FiveM checks pending
Example alarm range · not to scale65 m · silent5 m · full gainListenerSame bucketApproved audience

One source, eligible listeners

  1. Approve the cue. Choose the asset, range, category and request policy on the server.
  2. Place the sound. Use coordinates or a networked entity, with bucket and audience controls.
  3. Mix locally. Apply falloff, bus gain, personal preferences and optional environmental filters.
server.luaBundled positional cue
local ok, handle = exports.np_audio:playOneShot('notify', {
  coords = vec3(120.0, -200.0, 30.0),
  bucket = 0,
})
if not ok then print(handle) end

Example speaker coverage using the bundled alarm defaults; distances are illustrative.

What it provides

Sound where it belongs

  • Doorbells, alarms and machinery at a world position, or attached to a moving networked entity.

Direction and distance

  • HRTF directionality with linear, inverse or exponential falloff. Multiple speakers contribute the strongest signal.

Mix the scene

  • Hierarchical buses, mute, volume ramps and static scenes with a shared start time.

Keep music together

  • Clock anchors, late-listener seeking, queues and two-deck crossfades from approved catalog cues.

Approved playback

  • The server owns cues, source handles, permissions, request cooldowns and audience selection.

Environmental filters

  • Optional wall probes, vehicle and water muffling, lowpass and synthetic reverb in the built-in player.

Personal listening

  • Local master and category levels, mute and streamer mode, saved per player.

Optional adapters

  • GTA soundsets, xSound, packaged InteractSound assets and compatible np_screens music channels.

A closer look

Follow the world

Use a fixed coordinate for a doorbell or a networked entity for a moving source. Per-emitter reference distance, maximum distance and gain define its coverage. The strongest speaker contributes one signal.

Shape its sound

Choose a falloff curve, optional wall probes, vehicle/water muffling, lowpass and reverb. The built-in backend provides HRTF directionality. The environmental model is an approximation.

Spatial audio reference →

Two decks, one clock

Schedule a common start, seek late listeners to the anchored position, queue approved songs and crossfade between two channels. Autoplay uses trusted cue durations.

Buses and scenes

Group sources under parent buses, mute a whole branch or schedule a volume ramp. Static scenes create several sources at once and roll back newly created sources if one entry fails.

Music channels reference →

Hear what belongs to you

Server routing buckets, distance, player lists and custom audience policies decide who receives a source. Interior IDs add a local rendering gate.

Keep personal control

Players save master and category levels, mute a category and enable streamer mode. These controls affect their own listening. The debug overlay shows active sources and emitter positions.

Commands and validation →

Set it up

Start the resource

ensure np_audio
add_ace group.admin np_audio.admin allow

Enable OneSync. Three original WAV cues are bundled. Edit the cue catalog, limits, categories and allowed HTTPS hosts in configuration.

Attach a consumer

Register cues and buses through the np_addon API 1 lifecycle so they return after a host restart. Your resource owns its registrations and handles; stopping it releases them.

Installation guide →

Standalone by default

The built-in Web Audio player provides the full spatial, mixer and effects API. External direct media needs approved HTTPS hosts, CORS and a supported CEF codec.

Optional backends

GTA soundsets have limited transport/volume control. xSound provides compatibility playback. Compatible np_screens channels may own URL/YouTube music, keeping their own local preferences and effect limits.

Backend contracts →

Server-owned playback

Register cues, play and control owned sources, define audience filters, create buses/scenes and manage music channels. Volumes use 0..1 and timestamps use the server clock.

Approved client requests

Clients request only cue IDs. The server checks policy, cooldown and replay, then derives the player source and bucket. A local media report cannot change the shared queue.

Full exports and events →

Questions

Do I need xSound?

No. The built-in player runs independently; xSound and np_screens are optional adapters.

Does it replace my venue or voice system?

Existing resource calls remain independent. Voice capture, phone/radio calls and mic bridges belong to their voice resource.

Is playback sample-accurate?

It uses shared clock anchors and seeking. Cold decoding, network latency and live streams can affect timing.

Has it been tested in FiveM?

Automated checks and Chromium playback pass. The documented two-client FiveM, soundset and streaming checks are still pending.

Related resources

Resources can adopt the audio API through its documented server and client exports.