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

# XMA2Defs

> XMA2Defs

XMA2Defs API

## 函数

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

## 结构

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

## 概念文档

* [XMA2 概述](https://docs.xbox.com/zh-CN/build/console-features/audio/overviews/xma2-overview.md)

## 另请参阅

[音频 API 参考](https://docs.xbox.com/zh-CN/reference/audio/gc-reference-audio-toc.md)


## Related topics

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