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

# ShapeXmaContext

> ShapeXmaContext

ShapeXmaContext APIs

## Functions

| Function | Description |
| - | - |
| [GetShapeXmaCurrentInputBuffer](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmacurrentinputbuffer.md) | Gets the current input buffer. |
| [GetShapeXmaErrorSet](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaerrorset.md) | Gets a flag that indicates whether an error has occurred. |
| [GetShapeXmaErrorStatus](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaerrorstatus.md) | Gets the current error values. |
| [GetShapeXmaInputBuffer0](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmainputbuffer0.md) | Gets the address of the left input buffer. |
| [GetShapeXmaInputBuffer0Size](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmainputbuffer0size.md) | Gets the size of the left input buffer. |
| [GetShapeXmaInputBuffer0Valid](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmainputbuffer0valid.md) | Gets the validity flag of the left input buffer. |
| [GetShapeXmaInputBuffer1](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmainputbuffer1.md) | Gets the address of the right input buffer. |
| [GetShapeXmaInputBuffer1Size](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmainputbuffer1size.md) | Gets the size of the right input buffer. |
| [GetShapeXmaInputBuffer1Valid](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmainputbuffer1valid.md) | Gets the validity flag of the right input buffer. |
| [GetShapeXmaInputBufferReadOffset](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmainputbufferreadoffset.md) | Gets the read offset of the current input buffer. |
| [GetShapeXmaInputBufferValid](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmainputbuffervalid.md) | Gets the validity flags of the input buffers. |
| [GetShapeXmaInterruptWhenDone](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmainterruptwhendone.md) | Reserved for internal use. |
| [GetShapeXmaLoopEndOffset](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaloopendoffset.md) | Gets the end offset of the XMA context loop. |
| [GetShapeXmaLoopStartOffset](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaloopstartoffset.md) | Gets the start offset of the XMA context loop. |
| [GetShapeXmaLoopSubframeEnd](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaloopsubframeend.md) | Gets the number of the last subframe of the loop. |
| [GetShapeXmaLoopSubframeSkip](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaloopsubframeskip.md) | Gets the number of subframes to skip at the start of the loop. |
| [GetShapeXmaNumChannels](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmanumchannels.md) | Gets the number of channels. |
| [GetShapeXmaNumLoops](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmanumloops.md) | Gets the number of XMA context loops. |
| [GetShapeXmaNumSubframesToDecode](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmanumsubframestodecode.md) | Gets the number of subframes to decode per pass. |
| [GetShapeXmaNumSubframesToSkip](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmanumsubframestoskip.md) | Gets the number of subframes to skip. |
| [GetShapeXmaOutputBuffer](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaoutputbuffer.md) | Gets the address of the output buffer. |
| [GetShapeXmaOutputBufferNumBytesAvailable](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaoutputbuffernumbytesavailable.md) | Gets the number of bytes available for reading from the output buffer. |
| [GetShapeXmaOutputBufferNumFramesAvailable](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaoutputbuffernumframesavailable.md) | Gets the number of frames available for reading from the output buffer. |
| [GetShapeXmaOutputBufferReadOffset](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaoutputbufferreadoffset.md) | Gets the read offset of the output buffer. |
| [GetShapeXmaOutputBufferSize](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaoutputbuffersize.md) | Gets the size of the output buffer. |
| [GetShapeXmaOutputBufferValid](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaoutputbuffervalid.md) | Gets the validity flag of the output buffer. |
| [GetShapeXmaOutputBufferWriteOffset](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaoutputbufferwriteoffset.md) | Gets the write offset of the output buffer. |
| [GetShapeXmaOverlapAddBuffer](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaoverlapaddbuffer.md) | Gets the address of the overlap-add buffer. |
| [GetShapeXmaPacketMetadata](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmapacketmetadata.md) | Reserved for internal use. |
| [GetShapeXmaParserErrorSet](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaparsererrorset.md) | Gets a flag that indicates whether an XMA parser error has occurred. |
| [GetShapeXmaParserErrorStatus](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmaparsererrorstatus.md) | Gets the current XMA parser error value. |
| [GetShapeXmaSampleRate](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmasamplerate.md) | Gets the sample rate. |
| [GetShapeXmaStopWhenDone](https://docs.xbox.com/reference/audio/shapexmacontext/functions/getshapexmastopwhendone.md) | Reserved for internal use. |
| [SetShapeXmaCurrentInputBuffer](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmacurrentinputbuffer.md) | Sets the current input buffer. |
| [SetShapeXmaInputBuffer0(SHAPE\_XMA\_CONTEXT\*, const void\*)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0.md) | Sets the address of the left input buffer. |
| [SetShapeXmaInputBuffer0(SHAPE\_XMA\_CONTEXT\*, APU\_ADDRESS)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0_2.md) | Sets the address of the left input buffer. |
| [SetShapeXmaInputBuffer0Size](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0size.md) | Sets the size of the left input buffer. |
| [SetShapeXmaInputBuffer0Valid](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0valid.md) | Sets the validity flag of the left input buffer. |
| [SetShapeXmaInputBuffer1(SHAPE\_XMA\_CONTEXT\*, const void\*)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1.md) | Sets the address of the right input buffer. |
| [SetShapeXmaInputBuffer1(SHAPE\_XMA\_CONTEXT\*, APU\_ADDRESS)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1_2.md) | Sets the address of the right input buffer. |
| [SetShapeXmaInputBuffer1Size](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1size.md) | Sets the size of the right input buffer. |
| [SetShapeXmaInputBuffer1Valid](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1valid.md) | Sets the validity flag of the right input buffer. |
| [SetShapeXmaInputBufferReadOffset](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainputbufferreadoffset.md) | Sets the read offset of the current input buffer. |
| [SetShapeXmaInputBufferValid](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainputbuffervalid.md) | Sets the validity flags of the input buffers. |
| [SetShapeXmaInterruptWhenDone](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmainterruptwhendone.md) | Reserved for internal use. |
| [SetShapeXmaLoopEndOffset](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaloopendoffset.md) | Sets the end offset of the XMA context loop. |
| [SetShapeXmaLoopStartOffset](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaloopstartoffset.md) | Sets the start offset of the XMA context loop. |
| [SetShapeXmaLoopSubframeEnd](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaloopsubframeend.md) | Specifies the last subframe of the loop. |
| [SetShapeXmaLoopSubframeSkip](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaloopsubframeskip.md) | Sets the number of subframes to skip at the start of the loop. |
| [SetShapeXmaNumChannels](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmanumchannels.md) | Sets the number of channels. |
| [SetShapeXmaNumLoops](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmanumloops.md) | Sets the number of XMA context loops. |
| [SetShapeXmaNumSubframesToDecode](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmanumsubframestodecode.md) | Sets the number of subframes to decode per pass. |
| [SetShapeXmaNumSubframesToSkip](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmanumsubframestoskip.md) | Sets the number of subframes to skip. |
| [SetShapeXmaOutputBuffer(SHAPE\_XMA\_CONTEXT\*, void\*)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffer.md) | Sets the address of the output buffer. |
| [SetShapeXmaOutputBuffer(SHAPE\_XMA\_CONTEXT\*, APU\_ADDRESS)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffer_2.md) | Sets the address of the output buffer. |
| [SetShapeXmaOutputBufferReadOffset](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoutputbufferreadoffset.md) | Sets the read offset of the output buffer. |
| [SetShapeXmaOutputBufferSize](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffersize.md) | Sets the size of the output buffer. |
| [SetShapeXmaOutputBufferValid](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffervalid.md) | Sets the validity flag of the output buffer. |
| [SetShapeXmaOverlapAddBuffer(SHAPE\_XMA\_CONTEXT\*, void\*)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoverlapaddbuffer.md) | Sets the address of the overlap-add buffer. |
| [SetShapeXmaOverlapAddBuffer(SHAPE\_XMA\_CONTEXT\*, APU\_ADDRESS)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoverlapaddbuffer_2.md) | Sets the address of the overlap-add buffer. |
| [SetShapeXmaPacketMetadata](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmapacketmetadata.md) | Reserved for internal use. |
| [SetShapeXmaSampleRate(SHAPE\_XMA\_CONTEXT\*, SHAPE\_XMA\_SAMPLE\_RATE)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmasamplerate.md) | Sets the sample rate. |
| [SetShapeXmaSampleRate(SHAPE\_XMA\_CONTEXT\*, UINT32)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmasamplerate_2.md) | Sets the sample rate. |
| [SetShapeXmaStopWhenDone](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmastopwhendone.md) | Reserved for internal use. |

## Structures

| Structure | Description |
| - | - |
| [SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/reference/audio/shapexmacontext/structs/shape_xma_context.md) | The XBOX Media Audio (XMA) context. |

## Enumerations

| Enumeration | Description |
| - | - |
| [SHAPE\_XMA\_SAMPLE\_RATE](https://docs.xbox.com/reference/audio/shapexmacontext/enums/shape_xma_sample_rate.md) | Valid sample rates. |


## Related topics

- [SHAPE_XMA_CONTEXT](https://docs.xbox.com/reference/audio/shapexmacontext/structs/shape_xma_context.md)
- [SetShapeXmaSampleRate(SHAPE_XMA_CONTEXT*, SHAPE_XMA_SAMPLE_RATE)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmasamplerate.md)
- [SetShapeXmaOutputBuffer(SHAPE_XMA_CONTEXT*, void*)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffer.md)
- [SetShapeXmaOverlapAddBuffer(SHAPE_XMA_CONTEXT*, void*)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmaoverlapaddbuffer.md)
- [SetShapeXmaSampleRate(SHAPE_XMA_CONTEXT*, UINT32)](https://docs.xbox.com/reference/audio/shapexmacontext/functions/setshapexmasamplerate_2.md)
