Skip to main content

GetXmaBlockContainingSample

Uses a specified seek table to find the XBOX Media Audio (XMA) block that contains a specified decoded sample. The seek table entries in an XMA file are stored in big-endian form and sometimes need to be converted before this function is called.

Syntax

Parameters

nBlockCount   
Type: DWORD
Number of blocks in the file. Same as the number of entries in the seek table. pSeekTable   _In_count_(nBlockCount)
Type: DWORD*
Pointer to the seek table data. nDesiredSample   
Type: DWORD
Decoded sample to locate. pnBlockContainingSample   _Out_
Type: DWORD*
Index of the block that contains the sample. pnSampleOffsetWithinBlock   _Out_
Type: DWORD*
Position of the sample in this block.

Return value

Type: HRESULT Success S_OK or error E_FAIL code.

Remarks

This function uses the pSeekTable pointer to find the XMA block that contains a given decoded sample. The seek table entries in an XMA file are stored in big-endian form.
The seek table entries may need to be converted prior to calling this function.
For more information about XMA2, see Overview of XMA2. For an overview of the audio architecture of XBOX One, see The sound of the future: The audio architecture in XBOX One.

Requirements

Header: xma2defs.h Supported platforms: XBOX One family consoles and XBOX Series consoles

See also

xma2defs
Last modified on August 20, 2026