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

# AcpHalReleaseShapeContexts

> AcpHalReleaseShapeContexts

# AcpHalReleaseShapeContexts

Releases context arrays for the Scalable Hardware Audio Processing Engine (SHAPE) and XBOX Media Audio (XMA).

## Syntax

```cpp theme={null}
HRESULT AcpHalReleaseShapeContexts(  
)  
```

### Parameters

None.

### Return value

Type: HRESULT

If the method succeeds, it returns `S_OK`. If the method fails, it returns one of the following codes (partial list):

| Return code            | Description                                 |
| ---------------------- | ------------------------------------------- |
| ACP\_E\_NOT\_ALLOCATED | The context arrays have not been allocated. |

## Remarks

Call this method to release Audio Control Processor (ACP) contexts that you created by calling [AcpHalAllocateShapeContexts](/reference/audio/acphal/functions/acphalallocateshapecontexts).

All ACP and SHAPE resources (context arrays in particular) are shared among all clients. The clients must coordinate the allocation and sharing of those resources.

## Requirements

**Header:** acphal.h

**Library:** acphal.lib

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[AcpHalAllocateShapeContexts](/reference/audio/acphal/functions/acphalallocateshapecontexts)\
[AcpHal](/reference/audio/acphal/acphal_members)


## Related topics

- [AcpHal](/reference/audio/acphal/acphal_members.md)
- [AcpHalAllocateShapeContexts](/reference/audio/acphal/functions/acphalallocateshapecontexts.md)
- [IAcpHal::Connect](/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_connect.md)
- [ACP_MESSAGE_ERROR](/reference/audio/acphal/structs/acp_message_error.md)
- [SHAPE_CONTEXTS](/reference/audio/acphal/structs/shape_contexts.md)
