Interleave

Interleaves audio samples such that all samples corresponding to a given frame are contiguous.

Syntax

void Interleave(
         XMVECTOR __restrict *pOutput,
         const XMVECTOR __restrict *pInput,
         const size_t uChannelCount,
         const size_t uFrameCount
)  

Parameters

pOutput
Type: XMVECTOR __restrict *

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

pInput
Type: XMVECTOR __restrict *

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

uChannelCount
Type: size_t 

[in] The number of channels contained in the data. uChannelCount must be greater than 1.

uFrameCount
Type: size_t 

[in] The number of frames of valid data. uFrameCount must be greater than 0.

Return value

Type: void 

None.

Remarks

For example, audio of the form [LLLRRR] becomes [LRLRLR].

Requirements

Header: Declared in XDSP.h.

Namespace: Use XDSP.

See also

XDSP Functions