The DirectX SDK (June 2010) release includes a little utility header,
XDSP.H. This contains CPU-based functions for computing the Fast Fourier Transform (FFT) as well as some related multi-channel audio interleave/deinterleave functionality primarily used in writing custom xAPOs for XAUDIO2. The DirectX SDK version makes use of SSE intrinsics, which means it supports Windows x86 and x64 native code generation. This header is not included in the Windows SDK 8.0 (see “Where is the DirectX SDK?“). If writing a custom xAPO for Metro style applications, you also likely want to support the Windows on ARM platform as well.
Attached to this post is a version of
XDSP.H that uses DirectXMath and compiles for x86, x64, and Windows on ARM. It can be used with either Visual Studio 11 or VS 2010 with the Windows 8.0 SDK, and compiles for both Win32 desktop applications and Metro style applications.
This release of
XDSP.H is bound to the Microsoft Public License (Ms-PL).
Full documentation for XDSP can be found in the offline help for the DirectX SDK (June 2010) release. These functions are in the
XDSP C++ namespace, and memory buffers provided to these functions must be 16-byte aligned.
Deinterleaves audio samples.
Fast Fourier Transform with an arbitrary number of samples.
Four sample Fast Fourier Transform.
Eight sample Fast Fourier Transform.
Sixteen sample Fast Fourier Transform.
Fast Fourier Transform, plus interleaved multichannel audio.
Initializes unity roots lookup table used by Fast Fourier Transform
Fast Fourier Transform, plus deinterleaves multichannel audio before
Converts complex components to polar form.
Arranges Fast Fourier Transform function output by order of increasing frequency.
Interleaves audio samples.
ButterflyDIT4_4 are internal implementation functions and not intended for direct use.