> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FFTInterleaved

> FFTInterleaved

# FFTInterleaved

Applies a 2<sup>N</sup>-sample Fast Fourier Transform (FFT), and it unswizzles the result so that the samples are arranged by increasing frequency. Audio is first deinterleaved if it is multichannel.

## Syntax

```cpp theme={null}
void DSP::FFTInterleaved(  
         XMVECTOR* __restrict pReal,  
         XMVECTOR* __restrict pImaginary,  
         const XMVECTOR* __restrict pUnityTable,  
         const size_t uChannelCount,  
         const size_t uLog2Length  
)  
```

### Parameters

*pReal*   \_Inout\_updates\_(((1 \<\< uLog2Length) \* uChannelCount) / 4)\
Type: XMVECTOR\* \_\_restrict

Real components of the FFT. It must have at least (1 \<\< *uLog2Length* × *uChannelCount*) ÷ 4 elements.

*pImaginary*   \_Out\_writes\_(((1 \<\< uLog2Length) \* uChannelCount) / 4)\
Type: XMVECTOR\* \_\_restrict

Imaginary components of the FFT. It must have at least (1 \<\< *uLog2Length* × *uChannelCount*) ÷ 4 elements.

*pUnityTable*   \_In\_reads\_(1 \<\< uLog2Length)\
Type: XMVECTOR\* \_\_restrict

Unity table to be used by the FFT. It must have at least (1 \<\< *uLog2Length*) elements.

*uChannelCount*   \_In\_\
Type: size\_t

Number of channels in the FFT. *uChannelCount* must be within \[1, 6].

*uLog2Length*   \_In\_\
Type: size\_t

Base-2 log of the FFT length in frames. *uLog2Length* must be within \[2, 9].

### Return value

Type: void

None.

## Remarks

The memory pointed to by the parameters pReal, pImaginary, and pUnityTable must not overlap. Use the FFTIntializeUnityTable function to assign a value to the pUnityTable parameter. The FFTInitializedUnityTable function initializes a unity roots lookup table used by FFT functions.

## Requirements

**Header:** xdsp.h

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[xdsp](/reference/audio/xdsp/xdsp_members)

[Game for Windows and the DirectX SDK blog](https://walbourn.github.io/xdsp-h-digital-signal-processing-helper-functions/)

[Deinterleave](/reference/audio/xdsp/functions/deinterleave)

[FFTInitializeUnityTable](/reference/audio/xdsp/functions/fftinitializeunitytable)

[FFTUnswizzle](/reference/audio/xdsp/functions/fftunswizzle)


## Related topics

- [FFTInitializeUnityTable](/reference/audio/xdsp/functions/fftinitializeunitytable.md)
- [Deinterleave](/reference/audio/xdsp/functions/deinterleave.md)
- [FFTUnswizzle](/reference/audio/xdsp/functions/fftunswizzle.md)
- [post_decode_audio_sink_stream::set_processed_format](/reference/chat/gamechat2/classes/post_decode_audio_sink_stream/methods/post_decode_audio_sink_stream_set_processed_format.md)
- [game_chat_audio_format](/reference/chat/gamechat2/structs/game_chat_audio_format.md)
