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

# GetXmaFrameBitPosition

> GetXmaFrameBitPosition

# GetXmaFrameBitPosition

计算指定帧在 XBOX Media Audio (XMA) 块或一组块中的位偏移量。

## 语法

```cpp theme={null}
DWORD GetXmaFrameBitPosition(  
         const BYTE* pXmaData,  
         DWORD nXmaDataBytes,  
         DWORD nStreamIndex,  
         DWORD nDesiredFrame  
)  
```

### 参数

*pXmaData*   \_In\_bytecount\_(nXmaDataBytes)\
类型：BYTE\*

指向 XMA 块的指针。

*nXmaDataBytes*   \
类型：DWORD

pXmaData 的大小（以字节为单位）。

*nStreamIndex*   \
类型：DWORD

要在其中查找的流。

*nDesiredFrame*   \
类型：DWORD

要查找的帧。

### 返回值

类型：DWORD

返回位位置；失败时返回 0。

## 备注

此函数计算给定帧在 XMA 块或一组块中的位偏移量。失败时返回 0。使用 `pXmadata` 参数作为指向 XMA 块的指针。有关 XBOX One 音频架构的概述，请参阅**未来之声**：[XBOX One 中的音频架构](/build/console-features/audio/overviews/xbox-one-audio-architecture)。

## 要求

**头文件：** xma2defs.h

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

## 另请参阅

[音频概述](/build/console-features/audio/overviews/audio)

[xma2defs](/reference/audio/xma2defs/xma2defs_members)


## Related topics

- [XMA2Defs](/zh-CN/reference/audio/xma2defs/xma2defs_members.md)
- [GetLastXmaFrameBitPosition](/zh-CN/reference/audio/xma2defs/functions/getlastxmaframebitposition.md)
- [GetXmaFrameLengthInBits](/zh-CN/reference/audio/xma2defs/functions/getxmaframelengthinbits.md)
- [GetXmaPacketFirstFrameOffsetInBits](/zh-CN/reference/audio/xma2defs/functions/getxmapacketfirstframeoffsetinbits.md)
- [GetXmaDecodePositionForSample](/zh-CN/reference/audio/xma2defs/functions/getxmadecodepositionforsample.md)
