AudioClient3 outputs

getNextAudibleBeat

GET_NEXT_AUDIBLE_BEAT0xC64A06D939F826F5

The GTA V native GET_NEXT_AUDIBLE_BEAT of the AUDIO namespace, as LS:MP client scripts call it: the global function getNextAudibleBeat, in JavaScript and in Lua.

SignatureJavaScript
getNextAudibleBeat(): [ok: boolean, out1: number, out2: number, out3: number]
SignatureLua
getNextAudibleBeat(): boolean, number, number, integer

Usage

JavaScript
const [ok, out1, out2, out3] = getNextAudibleBeat();
Lua
local ok, out1, out2, out3 = getNextAudibleBeat()

Parameters

None. The game writes the outputs: they are handed back, not passed in.

Returns

4 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1okBOOLbooleanbooleanThe native’s own return value.
2out1floatnumbernumberoutput
3out2floatnumbernumberoutput
4out3intnumberintegeroutput

Reference

Namespace
Audio AUDIO
In the game
BOOL GET_NEXT_AUDIBLE_BEAT(float* out1, float* out2, int* out3)
Hash
0xC64A06D939F826F5
Introduced
Game build 1493 legacy numbering

Open in the interactive natives reference