Skip to main content

SHAPE_XMA_CONTEXT

The XBOX Media Audio (XMA) context.

Syntax

Members

sizeRead0
Type: UINT32
Write: Size, in 2-KB blocks, of the left input buffer. numLoops
Type: UINT32
Read/Write: Number of loops. 255 specifies infinite (continuous) looping. validBuffer
Type: UINT32
Read/Write: Validity flags for the input buffers. sizeWrite
Type: UINT32
Write: Size, in 256-byte blocks, of the output buffer. offsetWrite
Type: UINT32
Read: Offset, in 256-byte blocks, into the output buffer where the hardware will write. sizeRead1
Type: UINT32
Write: Size, in 2-KB blocks, of the right input buffer. loopSubframeEnd
Type: UINT32
Write: Subframe number of the loop endpoint, inclusive. reserved0
Type: UINT32
Reserved. loopSubframeSkip
Type: UINT32
Write: Number of subframes to skip at the beginning of the loop. Valid values are 0, 1, 2, 3, and 4. numSubframesToDecode
Type: UINT32
Write: Number of subframes to decode per pass. Valid values are 1, 2, 4, and 8. numSubframesToSkip
Type: UINT32
Write: Number of subframes to skip. Valid values are 0, 1, 2, 3, and 4. sampleRate
Type: UINT32
Write: Sample rate of the stream. Valid values are in the SHAPE_XMA_SAMPLE_RATE enumeration. numChannels
Type: UINT32
Write: Number of channels in the stream. 0 specifies mono (one channel); 1 specifies stereo (two channels). reserved1
Type: UINT32
Reserved. validWrite
Type: UINT32
Read/Write: Validity flag for the write buffer. 1 indicates that the hardware can write; 0 indicates that the hardware cannot write. offsetRead
Type: UINT32
Read/Write: Offset, in bits, from the beginning of the input buffer. errorStatus
Type: UINT32
Read: One or more error values. errorSet
Type: UINT32
Read: Error flag. 0 if no error has occurred; 1 if an error has occurred. Use GetShapeXmaErrorStatus to retrieve error values. loopStartOffset
Type: UINT32
Write: Offset, in bits, from the read-buffer pointer where the hardware will start decoding. parserErrorStatus
Type: UINT32
Read: Parser error value. parserErrorSet
Type: UINT32
Read: Parser error flag. 0 if no error has occurred; 1 if an error has occurred. Use GetShapeXmaParserErrorStatus to retrieve error value. loopEndOffset
Type: UINT32
Write: Offset, in bits, from the read-buffer pointer where the hardware will end decoding. packetMetaData
Type: UINT32
Reserved for internal use. currentBuffer
Type: UINT32
Read/Write: Current input buffer. 0 specifies the left buffer, and 1 specifies the right buffer. ptrRead0
Type: UINT32
Write: Pointer to the left input buffer. Aligned on 2-KB boundaries; lower 11 bits are ignored. ptrRead1
Type: UINT32
Write: Pointer to the right input buffer. Aligned on 2-KB boundaries; lower 11 bits are ignored. ptrWrite
Type: UINT32
Write: Pointer to the output buffer. Aligned on 64-byte boundaries. ptrOverlapAdd
Type: UINT32
Write: Pointer to the working buffer. Aligned on 128-byte boundaries. writeBufferOffsetRead
Type: UINT32
Write: Offset, in 256-byte blocks, of the read pointer in the output buffer. reserved2
Type: UINT32
Reserved. stopWhenDone
Type: UINT32
Reserved for internal use. interruptWhenDone
Type: UINT32
Reserved for internal use. reserved
Type: UINT32[6]
Reserved.

Remarks

This structure contains the context for the XMA decoder block. The maximum size of an input buffer is 8 MB. To determine the status of an input buffer’s consumption, examine the offsetRead, currentBuffer, and validBuffer members. Members that are marked as Read are written by the Audio Control Processor (ACP) library and should only be read by your application. Members that marked as Write are set by your application and are not changed by the ACP library. Members that are marked as Read/Write are set by your application but can be changed by the ACP library. For more information, see the XMA section of Overview of SHAPE.

Requirements

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

Conceptual documentation

See also

ShapeXmaContext
Last modified on August 20, 2026