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

# ShapeXmaContext

> ShapeXmaContext

# ShapeXmaContext

ShapeXmaContext APIs

## Functions

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

## Structures

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

## Enumerations

| Enumeration                                                                              | Description         |
| ---------------------------------------------------------------------------------------- | ------------------- |
| [SHAPE\_XMA\_SAMPLE\_RATE](/reference/audio/shapexmacontext/enums/shape_xma_sample_rate) | Valid sample rates. |


## Related topics

- [SHAPE_XMA_CONTEXT](/reference/audio/shapexmacontext/structs/shape_xma_context.md)
- [SetShapeXmaSampleRate(SHAPE_XMA_CONTEXT*, SHAPE_XMA_SAMPLE_RATE)](/reference/audio/shapexmacontext/functions/setshapexmasamplerate.md)
- [SetShapeXmaOutputBuffer(SHAPE_XMA_CONTEXT*, void*)](/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffer.md)
- [SetShapeXmaInputBuffer0(SHAPE_XMA_CONTEXT*, const void*)](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0.md)
- [SetShapeXmaInputBuffer1(SHAPE_XMA_CONTEXT*, const void*)](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1.md)
