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

## Functions

| 函数                                                                                                                                           | 说明                     |
| -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| [GetShapeXmaCurrentInputBuffer](/reference/audio/shapexmacontext/functions/getshapexmacurrentinputbuffer)                                    | 获取当前输入缓冲区。             |
| [GetShapeXmaErrorSet](/reference/audio/shapexmacontext/functions/getshapexmaerrorset)                                                        | 获取指示是否发生错误的标志。         |
| [GetShapeXmaErrorStatus](/reference/audio/shapexmacontext/functions/getshapexmaerrorstatus)                                                  | 获取当前错误值。               |
| [GetShapeXmaInputBuffer0](/reference/audio/shapexmacontext/functions/getshapexmainputbuffer0)                                                | 获取左输入缓冲区的地址。           |
| [GetShapeXmaInputBuffer0Size](/reference/audio/shapexmacontext/functions/getshapexmainputbuffer0size)                                        | 获取左输入缓冲区的大小。           |
| [GetShapeXmaInputBuffer0Valid](/reference/audio/shapexmacontext/functions/getshapexmainputbuffer0valid)                                      | 获取左输入缓冲区的有效性标志。        |
| [GetShapeXmaInputBuffer1](/reference/audio/shapexmacontext/functions/getshapexmainputbuffer1)                                                | 获取右输入缓冲区的地址。           |
| [GetShapeXmaInputBuffer1Size](/reference/audio/shapexmacontext/functions/getshapexmainputbuffer1size)                                        | 获取右输入缓冲区的大小。           |
| [GetShapeXmaInputBuffer1Valid](/reference/audio/shapexmacontext/functions/getshapexmainputbuffer1valid)                                      | 获取右输入缓冲区的有效性标志。        |
| [GetShapeXmaInputBufferReadOffset](/reference/audio/shapexmacontext/functions/getshapexmainputbufferreadoffset)                              | 获取当前输入缓冲区的读取偏移量。       |
| [GetShapeXmaInputBufferValid](/reference/audio/shapexmacontext/functions/getshapexmainputbuffervalid)                                        | 获取输入缓冲区的有效性标志。         |
| [GetShapeXmaInterruptWhenDone](/reference/audio/shapexmacontext/functions/getshapexmainterruptwhendone)                                      | 保留供内部使用。               |
| [GetShapeXmaLoopEndOffset](/reference/audio/shapexmacontext/functions/getshapexmaloopendoffset)                                              | 获取 XMA 上下文循环的结束偏移量。    |
| [GetShapeXmaLoopStartOffset](/reference/audio/shapexmacontext/functions/getshapexmaloopstartoffset)                                          | 获取 XMA 上下文循环的起始偏移量。    |
| [GetShapeXmaLoopSubframeEnd](/reference/audio/shapexmacontext/functions/getshapexmaloopsubframeend)                                          | 获取循环的最后一个子帧的编号。        |
| [GetShapeXmaLoopSubframeSkip](/reference/audio/shapexmacontext/functions/getshapexmaloopsubframeskip)                                        | 获取在循环开始处要跳过的子帧数量。      |
| [GetShapeXmaNumChannels](/reference/audio/shapexmacontext/functions/getshapexmanumchannels)                                                  | 获取通道数。                 |
| [GetShapeXmaNumLoops](/reference/audio/shapexmacontext/functions/getshapexmanumloops)                                                        | 获取 XMA 上下文循环的数量。       |
| [GetShapeXmaNumSubframesToDecode](/reference/audio/shapexmacontext/functions/getshapexmanumsubframestodecode)                                | 获取每次运行要解码的子帧数量。        |
| [GetShapeXmaNumSubframesToSkip](/reference/audio/shapexmacontext/functions/getshapexmanumsubframestoskip)                                    | 获取要跳过的子帧数量。            |
| [GetShapeXmaOutputBuffer](/reference/audio/shapexmacontext/functions/getshapexmaoutputbuffer)                                                | 获取输出缓冲区的地址。            |
| [GetShapeXmaOutputBufferNumBytesAvailable](/reference/audio/shapexmacontext/functions/getshapexmaoutputbuffernumbytesavailable)              | 获取可从输出缓冲区读取的字节数。       |
| [GetShapeXmaOutputBufferNumFramesAvailable](/reference/audio/shapexmacontext/functions/getshapexmaoutputbuffernumframesavailable)            | 获取可从输出缓冲区读取的帧数。        |
| [GetShapeXmaOutputBufferReadOffset](/reference/audio/shapexmacontext/functions/getshapexmaoutputbufferreadoffset)                            | 获取输出缓冲区的读取偏移量。         |
| [GetShapeXmaOutputBufferSize](/reference/audio/shapexmacontext/functions/getshapexmaoutputbuffersize)                                        | 获取输出缓冲区的大小。            |
| [GetShapeXmaOutputBufferValid](/reference/audio/shapexmacontext/functions/getshapexmaoutputbuffervalid)                                      | 获取输出缓冲区的有效性标志。         |
| [GetShapeXmaOutputBufferWriteOffset](/reference/audio/shapexmacontext/functions/getshapexmaoutputbufferwriteoffset)                          | 获取输出缓冲区的写入偏移量。         |
| [GetShapeXmaOverlapAddBuffer](/reference/audio/shapexmacontext/functions/getshapexmaoverlapaddbuffer)                                        | 获取重叠相加缓冲区的地址。          |
| [GetShapeXmaPacketMetadata](/reference/audio/shapexmacontext/functions/getshapexmapacketmetadata)                                            | 保留供内部使用。               |
| [GetShapeXmaParserErrorSet](/reference/audio/shapexmacontext/functions/getshapexmaparsererrorset)                                            | 获取指示是否发生 XMA 解析器错误的标志。 |
| [GetShapeXmaParserErrorStatus](/reference/audio/shapexmacontext/functions/getshapexmaparsererrorstatus)                                      | 获取当前 XMA 解析器错误值。       |
| [GetShapeXmaSampleRate](/reference/audio/shapexmacontext/functions/getshapexmasamplerate)                                                    | 获取采样率。                 |
| [GetShapeXmaStopWhenDone](/reference/audio/shapexmacontext/functions/getshapexmastopwhendone)                                                | 保留供内部使用。               |
| [SetShapeXmaCurrentInputBuffer](/reference/audio/shapexmacontext/functions/setshapexmacurrentinputbuffer)                                    | 设置当前输入缓冲区。             |
| [SetShapeXmaInputBuffer0(SHAPE\_XMA\_CONTEXT\*, const void\*)](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0)           | 设置左输入缓冲区的地址。           |
| [SetShapeXmaInputBuffer0(SHAPE\_XMA\_CONTEXT\*, APU\_ADDRESS)](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0_2)         | 设置左输入缓冲区的地址。           |
| [SetShapeXmaInputBuffer0Size](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0size)                                        | 设置左输入缓冲区的大小。           |
| [SetShapeXmaInputBuffer0Valid](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer0valid)                                      | 设置左输入缓冲区的有效性标志。        |
| [SetShapeXmaInputBuffer1(SHAPE\_XMA\_CONTEXT\*, const void\*)](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1)           | 设置右输入缓冲区的地址。           |
| [SetShapeXmaInputBuffer1(SHAPE\_XMA\_CONTEXT\*, APU\_ADDRESS)](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1_2)         | 设置右输入缓冲区的地址。           |
| [SetShapeXmaInputBuffer1Size](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1size)                                        | 设置右输入缓冲区的大小。           |
| [SetShapeXmaInputBuffer1Valid](/reference/audio/shapexmacontext/functions/setshapexmainputbuffer1valid)                                      | 设置右输入缓冲区的有效性标志。        |
| [SetShapeXmaInputBufferReadOffset](/reference/audio/shapexmacontext/functions/setshapexmainputbufferreadoffset)                              | 设置当前输入缓冲区的读取偏移量。       |
| [SetShapeXmaInputBufferValid](/reference/audio/shapexmacontext/functions/setshapexmainputbuffervalid)                                        | 设置输入缓冲区的有效性标志。         |
| [SetShapeXmaInterruptWhenDone](/reference/audio/shapexmacontext/functions/setshapexmainterruptwhendone)                                      | 保留供内部使用。               |
| [SetShapeXmaLoopEndOffset](/reference/audio/shapexmacontext/functions/setshapexmaloopendoffset)                                              | 设置 XMA 上下文循环的结束偏移量。    |
| [SetShapeXmaLoopStartOffset](/reference/audio/shapexmacontext/functions/setshapexmaloopstartoffset)                                          | 设置 XMA 上下文循环的起始偏移量。    |
| [SetShapeXmaLoopSubframeEnd](/reference/audio/shapexmacontext/functions/setshapexmaloopsubframeend)                                          | 指定循环的最后一个子帧。           |
| [SetShapeXmaLoopSubframeSkip](/reference/audio/shapexmacontext/functions/setshapexmaloopsubframeskip)                                        | 设置在循环开始处要跳过的子帧数量。      |
| [SetShapeXmaNumChannels](/reference/audio/shapexmacontext/functions/setshapexmanumchannels)                                                  | 设置通道数。                 |
| [SetShapeXmaNumLoops](/reference/audio/shapexmacontext/functions/setshapexmanumloops)                                                        | 设置 XMA 上下文循环的数量。       |
| [SetShapeXmaNumSubframesToDecode](/reference/audio/shapexmacontext/functions/setshapexmanumsubframestodecode)                                | 设置每次运行要解码的子帧数量。        |
| [SetShapeXmaNumSubframesToSkip](/reference/audio/shapexmacontext/functions/setshapexmanumsubframestoskip)                                    | 设置要跳过的子帧数量。            |
| [SetShapeXmaOutputBuffer(SHAPE\_XMA\_CONTEXT\*, void\*)](/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffer)                 | 设置输出缓冲区的地址。            |
| [SetShapeXmaOutputBuffer(SHAPE\_XMA\_CONTEXT\*, APU\_ADDRESS)](/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffer_2)         | 设置输出缓冲区的地址。            |
| [SetShapeXmaOutputBufferReadOffset](/reference/audio/shapexmacontext/functions/setshapexmaoutputbufferreadoffset)                            | 设置输出缓冲区的读取偏移量。         |
| [SetShapeXmaOutputBufferSize](/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffersize)                                        | 设置输出缓冲区的大小。            |
| [SetShapeXmaOutputBufferValid](/reference/audio/shapexmacontext/functions/setshapexmaoutputbuffervalid)                                      | 设置输出缓冲区的有效性标志。         |
| [SetShapeXmaOverlapAddBuffer(SHAPE\_XMA\_CONTEXT\*, void\*)](/reference/audio/shapexmacontext/functions/setshapexmaoverlapaddbuffer)         | 设置重叠相加缓冲区的地址。          |
| [SetShapeXmaOverlapAddBuffer(SHAPE\_XMA\_CONTEXT\*, APU\_ADDRESS)](/reference/audio/shapexmacontext/functions/setshapexmaoverlapaddbuffer_2) | 设置重叠相加缓冲区的地址。          |
| [SetShapeXmaPacketMetadata](/reference/audio/shapexmacontext/functions/setshapexmapacketmetadata)                                            | 保留供内部使用。               |
| [SetShapeXmaSampleRate(SHAPE\_XMA\_CONTEXT\*, SHAPE\_XMA\_SAMPLE\_RATE)](/reference/audio/shapexmacontext/functions/setshapexmasamplerate)   | 设置采样率。                 |
| [SetShapeXmaSampleRate(SHAPE\_XMA\_CONTEXT\*, UINT32)](/reference/audio/shapexmacontext/functions/setshapexmasamplerate_2)                   | 设置采样率。                 |
| [SetShapeXmaStopWhenDone](/reference/audio/shapexmacontext/functions/setshapexmastopwhendone)                                                | 保留供内部使用。               |

## Structures

| 结构                                                                                | 说明                   |
| --------------------------------------------------------------------------------- | -------------------- |
| [SHAPE\_XMA\_CONTEXT](/reference/audio/shapexmacontext/structs/shape_xma_context) | XBOX 媒体音频 (XMA) 上下文。 |

## Enumerations

| 枚举                                                                                       | 说明      |
| ---------------------------------------------------------------------------------------- | ------- |
| [SHAPE\_XMA\_SAMPLE\_RATE](/reference/audio/shapexmacontext/enums/shape_xma_sample_rate) | 有效的采样率。 |


## Related topics

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