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