From 4d1e823efd19071dd77e39f42ad51c957a1f4612 Mon Sep 17 00:00:00 2001 From: Mojito-Fivem Date: Sat, 11 Jun 2022 19:43:42 +0100 Subject: [PATCH] feat(client/exports): adds export to override effect submixes --- client/init/main.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/init/main.lua b/client/init/main.lua index c2f7bb8..ba14fe2 100644 --- a/client/init/main.lua +++ b/client/init/main.lua @@ -73,6 +73,18 @@ if gameVersion == 'fivem' then AddAudioSubmixOutput(callEffectId, 1) end +--- export setEffectSubmix +--- Sets a user defined audio submix for radio and phonecall effects +---@param type string either "call" or "radio" +---@param effectId number submix id returned from CREATE_AUDIO_SUBMIX +exports("setEffectSubmix", function(type, effectId) + if type == "call" then + callEffectId = effectId + elseif type == "radio" then + radioEffectId = effectId + end +end) + local submixFunctions = { ['radio'] = function(plySource) MumbleSetSubmixForServerId(plySource, radioEffectId)