Use a given seek table to find the XMA block containing a given decoded sample. Note that the seek table entries in an XMA file are stored in big-endian form and may need to be converted prior to calling this function.
HRESULT GetXmaBlockContainingSample(
DWORD nBlockCount,
const DWORD *pSeekTable,
DWORD nDesiredSample,
DWORD *pnBlockContainingSample,
DWORD *pnSampleOffsetWithinBlock
)
nBlockCount
Type: DWORD
Blocks in the file, the same as the number of seek table entries.
pSeekTable
Type: DWORD *
Pointer to the seek table data.
nDesiredSample
Type: DWORD
Decoded sample to locate.
pnBlockContainingSample
Type: DWORD *
[out] Index of the block containing the sample.
pnSampleOffsetWithinBlock
Type: DWORD *
[out] Position of the sample in this block.
Type: HRESULT
Success (S_OK) or error (E_FAIL) code.
This is an inline function, refer to the xma2defs.h file for the source code.
Header: Declared in xma2defs.h.
Library: Use xaudio2.lib and acphal.lib.