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

# GetLastXmaFrameBitPosition

> GetLastXmaFrameBitPosition

# GetLastXmaFrameBitPosition

Calculates the bit offset of the last complete frame in an XBOX Media Audio (XMA) block or in a set of blocks.

## Syntax

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

### Parameters

*pXmaData*   \_In\_bytecount\_(nXmaDataBytes)\
Type: BYTE\*

Pointer to XMA blocks.

*nXmaDataBytes*   \
Type: DWORD

Size of pXmaData in bytes.

*nStreamIndex*   \
Type: DWORD

Stream within which to seek.

### Return value

Type: DWORD

The bit offset.

## Remarks

This function calculates the bit offset of the last complete frame in an XMA block or set of blocks. For more information about XMA2, see [Overview of XMA2](/build/console-features/audio/overviews/xma2-overview). For an overview of the audio architecture of XBOX One, see **The sound of the future**: [The audio architecture in XBOX One](/build/console-features/audio/overviews/xbox-one-audio-architecture).

## Requirements

**Header:** xma2defs.h

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

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


## Related topics

- [XMA2Defs](/reference/audio/xma2defs/xma2defs_members.md)
- [GetXmaFrameBitPosition](/reference/audio/xma2defs/functions/getxmaframebitposition.md)
- [GetXmaFrameLengthInBits](/reference/audio/xma2defs/functions/getxmaframelengthinbits.md)
- [GetXmaPacketFirstFrameOffsetInBits](/reference/audio/xma2defs/functions/getxmapacketfirstframeoffsetinbits.md)
- [GetXmaDecodePositionForSample](/reference/audio/xma2defs/functions/getxmadecodepositionforsample.md)
