> ## 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.

# FFT

> FFT

# FFT

Fast Fourier Transform with an arbitrary number of samples.

## Syntax

```cpp theme={null}
void FFT(  
         XMVECTOR* __restrict pReal,  
         XMVECTOR* __restrict pImaginary,  
         const XMVECTOR* __restrict pUnityTable,  
         const size_t uLength,  
         const size_t uCount= 1  
)  
```

### Parameters

*pReal*   \_Inout\_updates\_((uLength \* uCount) / 4)\
Type: XMVECTOR\* \_\_restrict

Real components of the FFT. Must have at least (*uLength* × *uCount*) ÷ 4 elements.

*pImaginary*   \_Inout\_updates\_((uLength \* uCount) / 4)\
Type: XMVECTOR\* \_\_restrict

Imaginary components of the FFT. Must have at least (*uLength* × *uCount*) ÷ 4 elements.

*pUnityTable*   \_In\_reads\_(uLength \* uCount)\
Type: XMVECTOR\* \_\_restrict

Unity table to be used by the FFT. Must have at least *uLength* × *uCount* XMVECTORs. For more information, see [FFTInitializeUnityTable](/reference/audio/xdsp/functions/fftinitializeunitytable).

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

FFT length in samples. *uLength* must be a power of two and greater than 16.

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

Number of FFT iterations.

### Return value

Type: void

None.

## Remarks

For FFTs with a number of samples that are less than or equal to 16, use [FFT16](/reference/audio/xdsp/functions/fft16), [FFT8](/reference/audio/xdsp/functions/fft8), or [FFT4](/reference/audio/xdsp/functions/fft4).

All buffer parameters must be 16-byte aligned. Audio data must be FLOAT32 mono.

## Requirements

**Header:** xdsp.h

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

## See also

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


## Related topics

- [Overview of a single stream FFT/IFFT using the XDSP API](/build/console-features/audio/overviews/xdsp-overview-single-stream-fft-ifft.md)
- [FFT16](/reference/audio/xdsp/functions/fft16.md)
- [FFT4](/reference/audio/xdsp/functions/fft4.md)
- [FFT8](/reference/audio/xdsp/functions/fft8.md)
- [FFTInitializeUnityTable](/reference/audio/xdsp/functions/fftinitializeunitytable.md)
