Skip to content

Commands & validation ​

Player controls ​

Command Effect
`/audio volume <master category> <0..1>`
/audio mute <category> Toggles the category between 0 and 1
`/audio streamer <on off>`
/audiodebug Toggles the audible-source list and emitter markers

Default categories are sfx, music, dialogue, ambience, and ui. Local preferences persist in KVP and do not change what other players hear. The debug overlay shows rendered backend, gain, distance and lowpass values.

Staff controls ​

np_audio.admin permits /audioadmin stats, /audioadmin stop <full-source-id> and /audioadmin stopowner <resource>. The server console is also allowed. The owner command stops its current source/channel playback while preserving registrations and queues. There is no client network command for shared control.

Demo and live validation ​

Copy the bundled examples/np_audio_demo alongside np_audio and ensure it after the audio host. /audiobeep uses the approved request path. Staff /audioalarm places a stationary loop at their server-known position and toggles it off again.

The initial implementation has 35 passing automated checks and GitHub CI under Lua 5.4. A real Chromium check loaded and played the bundled WAV through HRTF, lowpass and reverb nodes and released it cleanly. No running FiveM server/client was available during implementation.

Before production, use two clients to check:

  1. Nearby, far away and other-bucket listeners; per-player mute and streamer mode.
  2. Turning around, distance falloff, walls, vehicle contexts and underwater effects.
  3. A moving networked entity, stream-out, deletion and routing bucket changes.
  4. Native soundsets on the intended GTA build.
  5. Late joins, pause/seek/resume, queues and two-deck fades.
  6. Audio host/consumer/optional backend restarts without duplicated playback.
  7. Server/CEF profiling at the target population and simultaneous source count.

Cold decoding, network latency, live streams without seeking, and external CORS/codec restrictions may affect playback. Local failure events are observations; they are not authority to skip shared media or ban a player.