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

# Deinterleave

> Deinterleave

# Deinterleave

This function deinterleaves audio samples such that all samples corresponding to a specified channel are contiguous.

## Syntax

```cpp theme={null}
void DSP::Deinterleave(  
         XMVECTOR* __restrict pOutput,  
         const XMVECTOR* __restrict pInput,  
         const size_t uChannelCount,  
         const size_t uFrameCount  
)  
```

### Parameters

*pOutput*   \_Out\_writes\_((uChannelCount \* uFrameCount) / 4)\
Type: XMVECTOR\* \_\_restrict

Caller-provided array of XMVECTOR elements that receives the samples in deinterleaved form. It cannot overlap pInput, and it must have at least (*uChannelCount* × *uFrameCount*) ÷ 4 elements.

*pInput*   \_In\_reads\_((uChannelCount \* uFrameCount) / 4)\
Type: XMVECTOR\* \_\_restrict

Caller-provided array of XMVECTOR elements that supplies audio samples in interleaved form. It cannot overlap pOutput, and it must have at least (*uChannelCount* × *uFrameCount*) ÷ 4 elements.

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

Number of channels contained in the data. *uChannelCount* must be greater than 1.

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

Number of frames of valid data. *uFrameCount* must be greater than 0.

### Return value

Type: void

None.

## Remarks

As an example, audio of the form \[LRLRLR] becomes \[LLLRRR]. For more information about deinterleave audio channels, see [De-interleave audio channels using SIMD instructions](https://stackoverflow.com/questions/39196188/de-interleave-audio-channels-using-simd-instructions). For more information about the interleave function, see [Interleave](/reference/audio/xdsp/functions/interleave).

## 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/)

[FFTInterleaved](/reference/audio/xdsp/functions/fftinterleaved)


## Related topics

- [Interleave](/reference/audio/xdsp/functions/interleave.md)
- [XApuDecodeConvertCommand](/reference/audio/xapu/structs/xapudecodeconvertcommand.md)
