AcpHalAllocateShapeContexts

Allocates context arrays for SHAPE and XMA.

Syntax

HRESULT AcpHalAllocateShapeContexts(
         SHAPE_CONTEXTS *contextArrays
)  

Parameters

contextArrays
Type: SHAPE_CONTEXTS *

[in, out] On input, the context should contain the requested size of the context arrays. If the function succeeds, the context will be populated with the allocated arrays. Refer to SHAPE_DMA_CONTEXT, SHAPE_EQCOMP_CONTEXT, SHAPE_FILTVOL_CONTEXT, SHAPE_PCM_CONTEXT, SHAPE_SRC_CONTEXT and SHAPE_XMA_CONTEXT.

Return value

Type: HRESULT 

If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.

Return codes
Return code Description
E_INVALIDARG One or more of the arguments are invalid.
E_OUTOFMEMORY There has been a memory allocation failure.
ACP_E_ALREADY_ALLOCATED The context arrays have already been allocated.

Remarks

This method should only be called once, unless there is a subsequent call to AcpHalReleaseShapeContexts.

The number of SRC contexts must equal the sum total of the number of PCM and XMA contexts.

Requirements

Header: Declared in acphal.h.

Library: Use acphal.lib.