Пример #1
0
            /// <summary>
            /// Checks to see if a object is equivalent to this AudioLoFiFilterSettings.
            /// </summary>
            /// <returns>True if equivalent, false otherwise.</returns>
            public bool Equals(AudioLoFiFilterSettings other)
            {
                if ((!other.LowPassCutoff.Equals(LowPassCutoff)) ||
                    (!other.HighPassCutoff.Equals(HighPassCutoff)))
                {
                    return(false);
                }

                return(true);
            }
Пример #2
0
        private void Awake()
        {
            LoadQualityFilterSettings();
            filterSettings = sourceQualityFilterSettings[SourceQuality];

            lowPassFilter = gameObject.GetComponent <AudioLowPassFilter>();
            lowPassFilter.cutoffFrequency = filterSettings.LowPassCutoff;

            highPassFilter = gameObject.GetComponent <AudioHighPassFilter>();
            highPassFilter.cutoffFrequency = filterSettings.HighPassCutoff;
        }
Пример #3
0
            /// <summary>
            /// Checks to see if a object is equivalent to this AudioLoFiFilterSettings.
            /// </summary>
            /// <returns>True if equivalent, false otherwise.</returns>
            public override bool Equals(object obj)
            {
                if (obj == null)
                {
                    return(false);
                }

                if (!(obj is AudioLoFiFilterSettings))
                {
                    return(false);
                }

                AudioLoFiFilterSettings other = (AudioLoFiFilterSettings)obj;

                return(Equals(other));
            }
Пример #4
0
        private void Update()
        {
            AudioLoFiFilterSettings newSettings = sourceQualityFilterSettings[SourceQuality];

            if (newSettings != filterSettings)
            {
                // If we have an attached AudioInfluencerController, we must let it know
                // about our filter settings change, otherwise other effects may not behave
                // as expected.
                if (influencerController != null)
                {
                    influencerController.NativeLowPassCutoffFrequency  = newSettings.LowPassCutoff;
                    influencerController.NativeHighPassCutoffFrequency = newSettings.HighPassCutoff;
                }

                filterSettings = newSettings;
                lowPassFilter.cutoffFrequency  = filterSettings.LowPassCutoff;
                highPassFilter.cutoffFrequency = filterSettings.HighPassCutoff;
            }
        }
        private void Update()
        {
            AudioLoFiFilterSettings newSettings = sourceQualityFilterSettings[SourceQuality];

            if (newSettings != filterSettings)
            {
                // If we have an attached AudioInfluencerManager, we need to let it know
                // about our filter settings change.
                AudioEmitter influencerManager = gameObject.GetComponent <AudioEmitter>();
                if (influencerManager != null)
                {
                    influencerManager.SetNativeLowPassCutoffFrequency(newSettings.LowPassCutoff);
                    influencerManager.SetNativeHighPassCutoffFrequency(newSettings.HighPassCutoff);
                }

                filterSettings = newSettings;
                lowPassFilter.cutoffFrequency  = filterSettings.LowPassCutoff;
                highPassFilter.cutoffFrequency = filterSettings.HighPassCutoff;
            }
        }
            /// <summary>
            /// Checks to see if a object is equivalent to this FilterSettings.
            /// </summary>
            /// <returns>True if equivalent, false otherwise.</returns>
            public override bool Equals(object obj)
            {
                if (obj == null)
                {
                    return(false);
                }

                if (!(obj is AudioLoFiFilterSettings))
                {
                    return(false);
                }

                AudioLoFiFilterSettings other = (AudioLoFiFilterSettings)obj;

                if ((other.LowPassCutoff != LowPassCutoff) ||
                    (other.HighPassCutoff != HighPassCutoff))
                {
                    return(false);
                }

                return(true);
            }