RedM Natives

SET_AUDIO_SUBMIX_OUTPUT_VOLUMES

Sets the volumes for the sound channels in a submix effect.

Hash0x825DC0D1
Runtime nameSetAudioSubmixOutputVolumes
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

void SET_AUDIO_SUBMIX_OUTPUT_VOLUMES(int submixId, int outputSlot, float frontLeftVolume, float frontRightVolume, float rearLeftVolume, float rearRightVolume, float channel5Volume, float channel6Volume);

Parameters

NameTypeDescription
submixIdint

The submix.

outputSlotint

The output slot index.

frontLeftVolumefloat

The volume for the front left channel.

frontRightVolumefloat

The volume for the front right channel.

rearLeftVolumefloat

The volume for the rear left channel.

rearRightVolumefloat

The volume for the rear right channel.

channel5Volumefloat

The volume for channel 5.

channel6Volumefloat

The volume for channel 6.

Returns void

Description

Cfx.re native reference

Sets the volumes for the sound channels in a submix effect. Values can be between 0.0 and 1.0. Channel 5 and channel 6 are not used in voice chat but are believed to be center and LFE channels. Output slot starts at 0 for the first ADD_AUDIO_SUBMIX_OUTPUT call then incremented by 1 on each subsequent call.

Usage

Lua
SetAudioSubmixOutputVolumes(submixId, outputSlot, frontLeftVolume, frontRightVolume, rearLeftVolume, rearRightVolume, channel5Volume, channel6Volume)

-- always works, by hash
Citizen.InvokeNative(0x825dc0d1, submixId, outputSlot, frontLeftVolume, frontRightVolume, rearLeftVolume, rearRightVolume, channel5Volume, channel6Volume)
JavaScript and C#
JavaScript
SetAudioSubmixOutputVolumes(submixId, outputSlot, frontLeftVolume, frontRightVolume, rearLeftVolume, rearRightVolume, channel5Volume, channel6Volume);

// by hash
Citizen.invokeNative('0x825dc0d1', submixId, outputSlot, frontLeftVolume + 0.0000001, frontRightVolume + 0.0000001, rearLeftVolume + 0.0000001, rearRightVolume + 0.0000001, channel5Volume + 0.0000001, channel6Volume + 0.0000001);
C#
Function.Call((Hash)0x825dc0d1, submixId, outputSlot, frontLeftVolume, frontRightVolume, rearLeftVolume, rearRightVolume, channel5Volume, channel6Volume);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.