GAudio.LFOFilterParam.OnPlayerWillMix C# (CSharp) Method

OnPlayerWillMix() public method

public OnPlayerWillMix ( ) : void
return void
        void OnPlayerWillMix()
        {
            float lerpVal = ( Mathf.Sin( _phase ) + 1f ) / 2;

            float paramVal = Mathf.Lerp( min, max, lerpVal );

            _filterParam.ParamValue = paramVal;

            _phase += _phaseIncrement * GATInfo.AudioBufferSizePerChannel;

            if( _phase > Mathf.PI * 2 )
            {
                _phase -= Mathf.PI * 2;
            }
        }