Packages/Photon/Photon/PhotonVoice/Code/Recorder.cs
/// <summary>
/// Sets the native Android audio input settings when the Photon microphone type is used.
/// </summary>
/// <param name="aec">Acoustic Echo Cancellation</param>
/// <param name="agc">Automatic Gain Control</param>
/// <param name="ns">Noise Suppression</param>
/// <returns>If a change has been made.</returns>
Sets the native Android audio input settings when the Photon microphone type is used.
Sets the native Android audio input settings when the Photon microphone type is used .
public bool SetAndroidNativeMicrophoneSettings(bool aec = false, bool agc = false, bool ns = false)
        {
            if (this.nativeAndroidMicrophoneSettings.AcousticEchoCancellation != aec ||
                this.nativeAndroidMicrophoneSettings.AutomaticGainControl != agc ||
                this.nativeAndroidMicrophoneSettings.NoiseSuppression != ns)
                {
                    if (this.Logger.IsInfoEnabled)
                    {
                        this.Logger.LogInfo("Changing Android native microphone settings to aec = {0}, agc = {1}, ns = {2}", aec, agc, ns);
                    }
                    #if !UNITY_EDITOR
                    if (this.IsRecording && this.SourceType == InputSourceType.Microphone && this.MicrophoneType == MicType.Photon)
                    {
                        this.RequiresRestart = true;
                        if (this.Logger.IsInfoEnabled)
                        {
                            this.Logger.LogInfo("Recorder.{0} changed, Recorder requires restart for this to take effect.", "nativeAndroidMicrophoneSettings");
                        }
                    }
                    #endif
                    return true;
                }
            return false;
        }
public bool SetAndroidNativeMicrophoneSettings ( bool aec = false , bool agc = false , bool ns = false ) { if ( this . nativeAndroidMicrophoneSettings . AcousticEchoCancellation != aec || this . nativeAndroidMicrophoneSettings . AutomaticGainControl != agc || this . nativeAndroidMicrophoneSettings . NoiseSuppression != ns ) { if ( this . Logger . IsInfoEnabled ) { this . Logger . LogInfo ( " " , aec , agc , ns ) ; } if ! UNITY_EDITOR if ( this . IsRecording && this . SourceType == InputSourceType . Microphone && this . MicrophoneType == MicType . Photon ) { this . RequiresRestart = true ; if ( this . Logger . IsInfoEnabled ) { this . Logger . LogInfo ( " " , " " ) ; } } endif return true ; } return false ; }
Sets the native Android audio input settings when the Photon microphone type is used.
Sets the native Android audio input settings when the Photon microphone type is used .
If a change has been made.
If a change has been made .
aec
bool
Acoustic Echo Cancellation
Acoustic Echo Cancellation
agc
bool
Automatic Gain Control
Automatic Gain Control
ns
bool
None