Beispiel #1
0
        internal void PlatformSetFilter(FilterMode mode, float filterQ, float frequency)
        {
            if (_voice == null)
            {
                return;
            }

            var filter = new FilterParameters
            {
                Frequency = XAudio2.CutoffFrequencyToRadians(frequency, _voice.VoiceDetails.InputSampleRate),
                OneOverQ  = 1.0f / filterQ,
                Type      = (FilterType)mode
            };

            _voice.SetFilterParameters(filter);
        }