Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forced to Restart (pma-voice) for voice_useNativeAudio convar to work. #483

Open
ItsVinnyX opened this issue Jul 26, 2024 · 11 comments
Open
Labels
todo Something that will be done in the future

Comments

@ItsVinnyX
Copy link

ItsVinnyX commented Jul 26, 2024

Did you read the README?: Yes.

Describe the bug
I set my convar to setr voice_useNativeAudio true. Then load into my server after restarting it, upon loading in, over radio the submix is not what it would be with voice_useNativeAudio being set to true.

No errors.

Expected behavior
Convar working as intended without having to restart the resource while in game.

Server Info:

  • Server Version: 8733
  • Client Version: Release
  • Client Build: Latest
  • Game: FiveM

Additional Info:

# Voice Configuration
setr voice_useNativeAudio true
setr voice_useSendingRangeOnly true
setr voice_enableUi 0
setr voice_defaultCycle "Z"
setr voice_defaultRadio "CAPITAL"
setr voice_defaultRadioVolume 60
setr voice_defaultCallVolume 80
setr voice_enableRadioAnim 0

ensure pma-voice
@AvarianKnight
Copy link
Owner

Closing this as it is not a pma-voice issue

@ItsVinnyX
Copy link
Author

ItsVinnyX commented Jul 26, 2024

Closing this as it is not a pma-voice issue

What could be causing this then? Everything is set correctly, but I still am forced to restart the resource. Using 6.6.2 Version, just doesn't make sense.

It's set before runtime in the cfg. Anyway to fix this? Any certain artifact?

@AvarianKnight AvarianKnight closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2024
@ItsVinnyX
Copy link
Author

See here: citizenfx/fivem#2675

Thanks, so there's no work around? I am not manually running the command in-game or in console, it's set as a convar in the cfg.

@AvarianKnight
Copy link
Owner

AvarianKnight commented Jul 26, 2024

Hmm actually I seem to have completely misread this, do you have any other resource that touches voice chat, as that is usually what causes something like this

@AvarianKnight AvarianKnight reopened this Jul 26, 2024
@ItsVinnyX
Copy link
Author

ItsVinnyX commented Jul 26, 2024

Hmm actually I seem to have completely misread this, do you have any other resource that touches voice chat

I was very confused, HAHA. I have mm_radio and that's about it regarding voice chat.
Well I also use Quasar Smartphone PRO

[    script:pma-voice] Initial values from GetConvar:
[    script:pma-voice] voice_useNativeAudio:	true
[    script:pma-voice] voice_useSendingRangeOnly:	true
[    script:pma-voice] voice_enableUi:	0
[    script:pma-voice] voice_defaultCycle:	Z
[    script:pma-voice] voice_defaultRadio:	CAPITAL
[    script:pma-voice] voice_defaultRadioVolume:	60
[    script:pma-voice] voice_defaultCallVolume:	80
[    script:pma-voice] voice_enableRadioAnim:	0
[    script:pma-voice] voice_enableSubmix:	1

I even did some debugs of the convars and they're printing correctly.

@ItsVinnyX
Copy link
Author

I got some more information. So let's say I restart the resource, it'll set the convars properly etc. However, if I relog and come back, my convars will act as if I do not have NativeAudio enabled on my end. So it seems to be more or less effected on the clients end. If I restart the resource everyone on the server receives the correct convars, if someone joins after the resource starts, they just get no submixes etc.

@AvarianKnight
Copy link
Owner

This is the first I'm ever hearing about this and I'm sad to say I can't really think of what might be causing this.

You can check to see if other resources change anything related to submixes, any convars for voice chat, or interact with mumble natives.

@ItsVinnyX
Copy link
Author

This is the first I'm ever hearing about this and I'm sad to say I can't really think of what might be causing this.

You can check to see if other resources change anything related to submixes, any convars for voice chat, or interact with mumble natives.

I'll put all of the related in here, I am unsure what exactly can cause this.

RegisterCommand('resetvoice', function()
    NetworkClearVoiceChannel()
    NetworkSessionVoiceLeave()
    Wait(50)
    NetworkSetVoiceActive(false)
    MumbleClearVoiceTarget(2)
    Wait(1000)
    MumbleSetVoiceTarget(2)
    NetworkSetVoiceActive(true)
    QBCore.Functions.Notify("You have successfully reset your voice box.")
end)

Then my Smartphone:

local pma = exports['pma-voice']
local mumble = exports['mumble-voip']
local toko = exports['tokovoip_script']

function AddToCall(callId)
    if Config.Voice == 'pma' then
        pma:addPlayerToCall(callId)
    elseif Config.Voice == 'mumble' then
        mumble:addPlayerToCall(callId)
    elseif Config.Voice == 'salty' then
        TriggerServerEvent('phone:addToCall', callId)
    elseif Config.Voice == 'toko' then
        toko:addPlayerToRadio(callId)
    end
end

function RemoveFromCall(callId)
    if Config.Voice == 'pma' then
        pma:removePlayerFromCall()
    elseif Config.Voice == 'mumble' then
        mumble:removePlayerFromCall()
    elseif Config.Voice == 'salty' then
        TriggerServerEvent('phone:removeFromCall', callId)
    elseif Config.Voice == 'toko' then
        toko:removePlayerFromRadio(callId)
    end
end

Submix in Helicam Script

local function EnableSubmix()
    SetAudioSubmixEffectRadioFx(0, 0)
    SetAudioSubmixEffectParamInt(0, 0, `default`, 1)
    SetAudioSubmixEffectParamFloat(0, 0, `freq_low`, 625.0)
    SetAudioSubmixEffectParamFloat(0, 0, `freq_hi`, 8000.0)
    SetAudioSubmixEffectParamFloat(0, 0, `fudge`, 0.5)
    SetAudioSubmixEffectParamFloat(0, 0, `rm_mix`, 50.0)
    submix = true
end

local function DisableSubmix()
    SetAudioSubmixEffectRadioFx(0, 0)
    SetAudioSubmixEffectParamInt(0, 0, `enabled`, 0)
    submix = false
end

But this is only enabled via a config, it's currently false.

That's everything with Submixes & Mumble. Everything else has to do with pma-voice.

Copy link

stale bot commented Aug 26, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Aug 26, 2024
@AvarianKnight AvarianKnight added todo Something that will be done in the future and removed wontfix This will not be worked on labels Aug 26, 2024
@AvarianKnight
Copy link
Owner

Tagging this so it wont be closed again, I don't have the time to look into this currently but I'll try to in the future.

@ItsVinnyX
Copy link
Author

Tagging this so it wont be closed again, I don't have the time to look into this currently but I'll try to in the future.

Appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo Something that will be done in the future
Projects
None yet
Development

No branches or pull requests

2 participants