XAudio2CutoffFrequencyToOnePoleCoefficient

Inline function that converts from filter cutoff frequencies expressed in hertz to the filter coefficients used with the Frequency member of the XAUDIO2_FILTER_PARAMETERS structure.

This function applies to LowPassOnePoleFilter and HighPassOnePole filter types only, use XAudio2CutoffFrequencyToRadians for state-variable filter types.

Syntax

float XAudio2CutoffFrequencyToOnePoleCoefficient(
         float CutoffFrequency,
         UINT32 SampleRate
)  

Parameters

CutoffFrequency
Type: float 

The cutoff frequency in hertz. Frequencies greater than SampleRate are clamped to XAUDIO2_MAX_FILTER_FREQUENCY.

SampleRate
Type: UINT32 

The sample rate of the audio data affected by the XAUDIO2_FILTER_PARAMETERS structure.

Return value

Type: float 

Returns a filter coefficient for use in the XAUDIO2_FILTER_PARAMETERS structure.

Remarks

You must explicitly define XAUDIO2_HELPER_FUNCTIONS in your build for this function to become available.

Requirements

Header: Declared in xaudio2.h.

Library: Use xaudio2.lib.