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

# GetXmaPacketFirstFrameOffsetInBits

> GetXmaPacketFirstFrameOffsetInBits

# GetXmaPacketFirstFrameOffsetInBits

这是 `XMA2PACKET` 结构的辅助函数，返回第一帧偏移量。

## 语法

```cpp theme={null}
DWORD GetXmaPacketFirstFrameOffsetInBits(  
         const BYTE* pPacket  
)  
```

### 参数

*pPacket*   \_In\_bytecount\_(3)\
类型：BYTE\*

指向数据包的指针。

### 返回值

类型：DWORD

第一帧的偏移量（以位为单位）。

## 备注

`GetXmaPacketFirstFrameOffsetInBits` 获取 XBOX Media Audio (XMA) 数据包中第一帧的位偏移量。

> [!NOTE]
>
> 在 Intel x86 等小端序架构上无法直接读取位域，因为它们以大端序形式布局。

有关 XMA2 的详细信息，请参阅 [XMA2 概述](https://docs.xbox.com/zh-CN/build/console-features/audio/overviews/xma2-overview.md)。有关 XBOX One 音频架构的概述，请参阅**未来之声**：[XBOX One 中的音频架构](https://docs.xbox.com/zh-CN/build/console-features/audio/overviews/xbox-one-audio-architecture.md)。

## 要求

**头文件：** xma2defs.h

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[xma2defs](https://docs.xbox.com/zh-CN/reference/audio/xma2defs/xma2defs_members.md)


## Related topics

- [XMA2Defs](https://docs.xbox.com/zh-CN/reference/audio/xma2defs/xma2defs_members.md)
- [GetXmaFrameLengthInBits](https://docs.xbox.com/zh-CN/reference/audio/xma2defs/functions/getxmaframelengthinbits.md)
- [XMA2PACKET](https://docs.xbox.com/zh-CN/reference/audio/xma2defs/structs/xma2packet.md)
- [GetXmaPacketFrameCount](https://docs.xbox.com/zh-CN/reference/audio/xma2defs/functions/getxmapacketframecount.md)
- [GetXmaFrameBitPosition](https://docs.xbox.com/zh-CN/reference/audio/xma2defs/functions/getxmaframebitposition.md)
