> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SetShapeXmaOverlapAddBuffer(SHAPE_XMA_CONTEXT*, APU_ADDRESS)

> SetShapeXmaOverlapAddBuffer(SHAPE_XMA_CONTEXT*, APU_ADDRESS)

Sets the address of the overlap-add buffer.

## Syntax

```cpp theme={null}
HRESULT SetShapeXmaOverlapAddBuffer(  
         SHAPE_XMA_CONTEXT* context,  
         APU_ADDRESS buffer  
)  
```

### Parameters

*context*   \_Inout\_\
Type: [SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/reference/audio/shapexmacontext/structs/shape_xma_context.md)\*

Pointer to a [SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/reference/audio/shapexmacontext/structs/shape_xma_context.md) object.

*buffer*   \_In\_\
Type: APU\_ADDRESS

Physical address of the overlap-add buffer.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

The size of the overlap-add buffer must be 256 bytes for mono or 512 bytes for stereo.

To set the address of the overlap-add buffer by using a pointer, use [SetShapeXmaOverlapAddBuffer(SHAPE\_XMA\_CONTEXT\*, void\*)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoverlapaddbuffer.md).

To get the current size of the overlap-add buffer, use [GetShapeXmaOverlapAddBuffer](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaoverlapaddbuffer.md).

For more information, see the [XMA](https://docs.xbox.com/build/console-features/audio/overviews/shape-overview.md#ID4EYD) section of [Overview of SHAPE](https://docs.xbox.com/build/console-features/audio/overviews/shape-overview.md).

## Requirements

**Header:** shapexmacontext.h

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

## See also

[ShapeXmaContext](https://docs.xbox.com/reference/audio/shapexmacontext/shapexmacontext_members.md)


## Related topics

- [SetShapeXmaOverlapAddBuffer(SHAPE_XMA_CONTEXT*, void*)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoverlapaddbuffer.md)
- [GetShapeXmaOverlapAddBuffer](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaoverlapaddbuffer.md)
- [ShapeXmaContext](https://docs.xbox.com/reference/audio/shapexmacontext/shapexmacontext_members.md)
- [SetShapeXmaOutputBuffer(SHAPE_XMA_CONTEXT*, APU_ADDRESS)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffer_2.md)
- [SetShapeXmaInputBuffer0(SHAPE_XMA_CONTEXT*, APU_ADDRESS)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0_2.md)
