UnityEditor.AudioSourceInspector.GetCurveWrapperArray C# (CSharp) Method

GetCurveWrapperArray() private method

private GetCurveWrapperArray ( ) : UnityEditor.CurveWrapper[]
return UnityEditor.CurveWrapper[]
        private CurveWrapper[] GetCurveWrapperArray()
        {
            List<CurveWrapper> list = new List<CurveWrapper>();
            foreach (AudioCurveWrapper wrapper in this.m_AudioCurves)
            {
                if (wrapper.curveProp != null)
                {
                    bool flag = false;
                    AnimationCurve animationCurveValue = wrapper.curveProp.animationCurveValue;
                    if (wrapper.type == AudioCurveType.Volume)
                    {
                        AudioRolloffMode enumValueIndex = (AudioRolloffMode) this.m_RolloffMode.enumValueIndex;
                        if (this.m_RolloffMode.hasMultipleDifferentValues)
                        {
                            flag = false;
                        }
                        else if (enumValueIndex == AudioRolloffMode.Custom)
                        {
                            flag = !wrapper.curveProp.hasMultipleDifferentValues;
                        }
                        else
                        {
                            flag = !this.m_MinDistance.hasMultipleDifferentValues && !this.m_MaxDistance.hasMultipleDifferentValues;
                            switch (enumValueIndex)
                            {
                                case AudioRolloffMode.Linear:
                                    animationCurveValue = AnimationCurve.Linear(this.m_MinDistance.floatValue / this.m_MaxDistance.floatValue, 1f, 1f, 0f);
                                    break;

                                case AudioRolloffMode.Logarithmic:
                                    animationCurveValue = Logarithmic(this.m_MinDistance.floatValue / this.m_MaxDistance.floatValue, 1f, 1f);
                                    break;
                            }
                        }
                    }
                    else
                    {
                        flag = !wrapper.curveProp.hasMultipleDifferentValues;
                    }
                    if (flag)
                    {
                        if (animationCurveValue.length == 0)
                        {
                            Debug.LogError(wrapper.legend.text + " curve has no keys!");
                        }
                        else
                        {
                            list.Add(this.GetCurveWrapper(animationCurveValue, wrapper));
                        }
                    }
                }
            }
            return list.ToArray();
        }