SET_AUDIO_SUBMIX_EFFECT_PARAM_FLOAT
Sets a floating-point parameter for a submix effect.
Signature
void SET_AUDIO_SUBMIX_EFFECT_PARAM_FLOAT(int submixId, int effectSlot, int paramIndex, float paramValue);Parameters
| Name | Type | Description |
|---|---|---|
submixId | int | The submix. |
effectSlot | int | The effect slot for the submix. It is expected that the effect is set in this slot beforehand. |
paramIndex | int | The parameter index for the effect. |
paramValue | float | The parameter value to set. |
Returns void
Description
Sets a floating-point parameter for a submix effect.
Usage
SetAudioSubmixEffectParamFloat(submixId, effectSlot, paramIndex, paramValue)
-- always works, by hash
Citizen.InvokeNative(0x9a209b3c, submixId, effectSlot, paramIndex, paramValue)JavaScript and C#
SetAudioSubmixEffectParamFloat(submixId, effectSlot, paramIndex, paramValue);
// by hash
Citizen.invokeNative('0x9a209b3c', submixId, effectSlot, paramIndex, paramValue + 0.0000001);Function.Call((Hash)0x9a209b3c, submixId, effectSlot, paramIndex, paramValue);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.