> ## 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 類別](https://learn.microsoft.com/previous-versions/microsoft-robotics/bb842567\(v%3Dmsdn.10\))。如需 Deinterleave 函式的資訊，請參閱 [Deinterleave](/zh-TW/reference/audio/xdsp/functions/deinterleave)。

## 需求

**標頭：** xdsp.h

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[xdsp](/zh-TW/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

- [FFTInterleaved](/zh-TW/reference/audio/xdsp/functions/fftinterleaved.md)
- [Deinterleave](/zh-TW/reference/audio/xdsp/functions/deinterleave.md)
