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

# XMA2Defs

> XMA2Defs

# XMA2Defs

XMA2Defs API

## 函数

| 函数                                                                                                           | 说明                                                |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- |
| [GetLastXmaFrameBitPosition](/reference/audio/xma2defs/functions/getlastxmaframebitposition)                 | 计算 XMA 块或一组块中最后一个完整帧的位偏移量。                        |
| [GetStandardChannelMaskFromXmaMask](/reference/audio/xma2defs/functions/getstandardchannelmaskfromxmamask)   | 在 WAVEFORMATEXTENSIBLE 通道掩码与 XMA 通道掩码之间进行转换。      |
| [GetXmaBlockContainingSample](/reference/audio/xma2defs/functions/getxmablockcontainingsample)               | 使用指定的查找表找到包含指定已解码采样的 XMA 块。                       |
| [GetXmaChannelMaskFromStandardMask](/reference/audio/xma2defs/functions/getxmachannelmaskfromstandardmask)   | 在 WAVEFORMATEXTENSIBLE 通道掩码与 XMA 通道掩码之间进行转换。      |
| [GetXmaDecodePositionForSample](/reference/audio/xma2defs/functions/getxmadecodepositionforsample)           | 获取所需信息，用于让解码器从相对于指定的 XMA 块开头的指定采样位置开始生成音频。        |
| [GetXmaFrameBitPosition](/reference/audio/xma2defs/functions/getxmaframebitposition)                         | 计算指定帧在 XMA 块或一组块中的位偏移量。                           |
| [GetXmaFrameLengthInBits](/reference/audio/xma2defs/functions/getxmaframelengthinbits)                       | 读取指定帧的 LengthInBits 字段。                           |
| [GetXmaPacketFirstFrameOffsetInBits](/reference/audio/xma2defs/functions/getxmapacketfirstframeoffsetinbits) | XMA2PACKET 结构的辅助函数。返回第一帧偏移量。                      |
| [GetXmaPacketFrameCount](/reference/audio/xma2defs/functions/getxmapacketframecount)                         | XMA2PACKET 结构的辅助函数。返回数据包的帧数。                      |
| [GetXmaPacketMetadata](/reference/audio/xma2defs/functions/getxmapacketmetadata)                             | XMA2PACKET 结构的辅助函数。                               |
| [GetXmaPacketSkipCount](/reference/audio/xma2defs/functions/getxmapacketskipcount)                           | XMA2PACKET 结构的辅助函数。返回要跳过的其他流的数据包数量。               |
| [GetXmaSampleRate](/reference/audio/xma2defs/functions/getxmasamplerate)                                     | 获取与通用采样率对应的合法 XMA 采样率（24、32、44.1 或 48 KHz）。       |
| [LocalizeXma2Format](/reference/audio/xma2defs/functions/localizexma2format)                                 | 就地修改 XMA2WAVEFORMATEX 结构，使其符合当前平台的字节序规则（小端序或大端序）。 |

## 结构

| 结构                                                                     | 说明                             |
| ---------------------------------------------------------------------- | ------------------------------ |
| [XMA2PACKET](/reference/audio/xma2defs/structs/xma2packet)             | XMA 数据包结构（大端序形式）。              |
| [XMA2STREAMFORMAT](/reference/audio/xma2defs/structs/xma2streamformat) | 在 XMA2WAVEFORMAT 中用于按流存储数据的结构。 |
| [XMA2WAVEFORMAT](/reference/audio/xma2defs/structs/xma2waveformat)     | 采用大端字节序的旧版 XMA2 格式结构。          |
| [XMA2WAVEFORMATEX](/reference/audio/xma2defs/structs/xma2waveformatex) | 表示 XMA2 文件格式信息的推荐方式。           |
| [XMASTREAMFORMAT](/reference/audio/xma2defs/structs/xmastreamformat)   | 在 XMAWAVEFORMAT 中用于按流存储数据。     |
| [XMAWAVEFORMAT](/reference/audio/xma2defs/structs/xmawaveformat)       | 旧版 XMA1 格式的结构。                 |

## 概念文档

* [XMA2 概述](/build/console-features/audio/overviews/xma2-overview)

## 另请参阅

[音频 API 参考](/reference/audio/gc-reference-audio-toc)


## Related topics

- [XMA2 概述](/zh-CN/build/console-features/audio/overviews/xma2-overview.md)
- [音频 API 参考](/zh-CN/reference/audio/gc-reference-audio-toc.md)
- [XMA2WAVEFORMATEX](/zh-CN/reference/audio/xma2defs/structs/xma2waveformatex.md)
- [XMA2PACKET](/zh-CN/reference/audio/xma2defs/structs/xma2packet.md)
- [XMA2STREAMFORMAT](/zh-CN/reference/audio/xma2defs/structs/xma2streamformat.md)
