AvarianKnight / pma-voice

An easy drag n' drop resource that gives you a wrapper to use FiveM's built-in mumble voice.
MIT License
219 stars 187 forks source link

Multiples submix and routing bucket #430

Closed CeebDev closed 1 year ago

CeebDev commented 1 year ago

Describe the bug When you have multiple submixes registered, and changing routing bucket, the sound go completely broken and stuttering (World env sound / vehicle sound etc... not tested yet with other player voices)

To Reproduce

  1. Register 10 differents submix to pma-voice
  2. Be in a routing bucket
  3. Switch to another routing bucket
  4. Sound broken

Expected behavior Be able to change routing bucket without break the game sound

Server Info:

Repro example code

local ConfigSubmixes = {
    micro = {},
    muffled = {},
    megaphone = {},
    helicopter = {},
    radio_default = {},
    radio_medium_range = {},
    radio_far_range = {},
}

RegisterCommand("addSubmix", function()
    for submixName, _ in pairs(ConfigSubmixes) do
        exports["pma-voice"]:registerCustomSubmix(function()
            local submixId = CreateAudioSubmix(submixName)
            AddAudioSubmixOutput(submixId, 1)
            return {
                submixName,
                submixId
            }
        end)
    end
end)

https://www.youtube.com/watch?v=5ww5Y_oSeNg

CeebDev commented 1 year ago

Just thinking but it's not the pma problem ? Because the export just register the submix in memory Waiting confirmation or maybe if you already faced this problem

If not i will create a bug report in FiveM repo

AvarianKnight commented 1 year ago

No this isn't a pma-voice issue, this also isn't a FiveM issue GTA has a max amount of submixs you can use and I think its relatively low, you should try to reuse submixs if you can.

If thats still an issue, you should put this as a feature request for the Collective to increase the max amount of submixes allowed to be registered