Photon Voice Chat Volume

stvster
stvster
edited June 2018 in Photon Voice
Hi,
My chat volume is very low.I tried this from an old post.
At the start of OnAudioFrame method in "PhotonVoiceNetworks.cs" I added these lines:
    for(int i =0; i < frame.Length; i++)
    {
        frame[i] *= (AppSettings.VoiceChatVolume * 5);
    } 
Only the AppSettings gives error( redlined ).The rest of it seems ok. The .VoiceChatVolume is Not redlined.
The AppSettings isn't found in the project search.
Any ideas?
Thanx,
Steve


Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited June 2018
    Hi @stvster,

    Thank you for choosing Photon!

    Just replace AppSettings.VoiceChatVolume * 5 with a gain factor (static or variable) of your choice.
    Get rid of AppSettings.VoiceChatVolume which is part of another developer's custom codebase.
  • stvster
    stvster
    edited September 2018
    Hi JohnTube ,
    Thanx for the answer.I tried this:
     for(int i =0; i < frame.Length; i++)
        {
            frame[i] *= ( 5);
        }
    no errors /game runs but no volume increase.I tried different variables(5 or 10 or 20 etc)
    But no difference.Will keep trying.
    Thanx again,
    Steve
  • jimx78
    jimx78
    edited September 2018
    Salut, j'ai essayer le code proposer et j'ai mis frame [i] * = (80); le son été complètement saturer, donc oui ça fonctionne !
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited September 2018
    Hi @jimx78,

    Thank you for choosing Photon and your feedback!
    It's good that you confirm that it works for you.

    We use English only on the forum, thank you for your understanding.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited July 2019
    Hey @stvster,

    Could you try importing this Unity package into your Photon Voice 2 project and add a MicAmplifier component attached to the same GameObject as the Recorder.
    Then tweak values of "Amplification Factor" or "Boost Value".
  • stvster
    stvster
    edited July 2019
    MicAmp worked GREAT!!
    Thanx for the help. :)
  • Hi @JohnTube ,

    Is it possible to reference the MicAmplifier script in another script, and change its amplification value? I tried it and no errors show up, but the AmplificationFactor value stays the same.