确定滤波器的自谐振衰减程度。
较高的低通谐振 Q 表示较低的能量损失率,即振荡衰减速度较慢。
低通谐振 Q 值从 1.0 到 10.0。默认值为 1.0。
using UnityEngine;
[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioLowPassFilter))] public class Example : MonoBehaviour { // Moves the Lowpass Resonance Quality Factor from 0 to 10 following a Sinus function // Attach this to an audio source with a LowPassFilter to listen to it working.
void Update() { GetComponent<AudioLowPassFilter>().lowpassResonanceQ = (Mathf.Sin(Time.time) * 5 + 5); } }