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

# Interleave

> Interleave

# Interleave

此函数对音频采样进行交错，使与指定帧对应的所有采样都连续排列。

## 语法

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

### 参数

*pOutput*   \_Out\_writes\_((uChannelCount \* uFrameCount) / 4)\
类型：XMVECTOR\* \_\_restrict

调用方提供的 XMVECTOR 元素数组，用于以交错形式接收采样。它不能与 *pInput* 重叠，且元素数量至少必须为 (*uChannelCount* × *uFrameCount*) ÷ 4。

*pInput*   \_In\_reads\_((uChannelCount \* uFrameCount) / 4)\
类型：XMVECTOR\* \_\_restrict

调用方提供的 XMVECTOR 元素数组，以去交错形式提供音频采样。它不能与 *pOutput* 重叠，且元素数量至少必须为 (*uChannelCount* × *uFrameCount*) ÷ 4。

*uChannelCount*   \_In\_\
类型：size\_t

数据中包含的通道数。*uChannelCount* 必须大于 1。

*uFrameCount*   \_In\_\
类型：size\_t

有效数据的帧数。*uFrameCount* 必须大于 0。

### 返回值

类型：void

无。

## 备注

例如，形式为 \[LLLRRR] 的音频将变为 \[LRLRLR]。有关 Interleave 类及其成员的详细信息，请参阅 [Interleave Class](https://learn.microsoft.com/previous-versions/microsoft-robotics/bb842567\(v%3Dmsdn.10\))。有关 Deinterleave 函数的信息，请参阅 [Deinterleave](/reference/audio/xdsp/functions/deinterleave)。

## 要求

**头文件：** xdsp.h

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

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

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

[Microsoft Audio/Video Interleaved](https://wiki.multimedia.cx/index.php/Microsoft_Audio/Video_Interleaved)


## Related topics

- [Deinterleave](/zh-CN/reference/audio/xdsp/functions/deinterleave.md)
