SET_AUDIO_SUBMIX_OUTPUT_VOLUMES
Sets the volumes for the sound channels in a submix effect.
Signature
void SET_AUDIO_SUBMIX_OUTPUT_VOLUMES(int submixId, int outputSlot, float frontLeftVolume, float frontRightVolume, float rearLeftVolume, float rearRightVolume, float channel5Volume, float channel6Volume);Parameters
| Name | Type | Description |
|---|---|---|
submixId | int | The submix. |
outputSlot | int | The output slot index. |
frontLeftVolume | float | The volume for the front left channel. |
frontRightVolume | float | The volume for the front right channel. |
rearLeftVolume | float | The volume for the rear left channel. |
rearRightVolume | float | The volume for the rear right channel. |
channel5Volume | float | The volume for channel 5. |
channel6Volume | float | The volume for channel 6. |
Returns void
Description
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
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#
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);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. 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.