Skip to main content

GetShapePcmReadPointer

Gets the read pointer.

Syntax

Parameters

context   _In_
Type: SHAPE_PCM_CONTEXT*
Pointer to a SHAPE_PCM_CONTEXT structure.

Return value

Type: UINT32 Specifies the read pointer in samples. This pointer treats two 16-bit stereo samples as a single 32-bit sample.

Remarks

To prevent blocked Direct Memory Access (DMA) commands, make sure that your audio buffer is sufficiently large and that data is streamed at regular intervals related to the buffer size. For example, if you are streaming four hardware frames at a time, ensure some multiple of those frames (at least double-buffered at eight) are in the buffer so the hardware can write ahead of the title’s read pointer. Alternatively, you could enforce emptying of the buffer before submitting the next flowgraph (consume, update DMA read pointer, and then submit the flowgraph). Start the voice using the SHAPE_SRC_COMMAND_TYPE_START constant for the SRC. Keep streaming data, updating the PCM context write pointer, until you want to stop. Use the SHAPE_SRC_COMMAND_TYPE_STOP_END constant to let the SRC play to the current PCM write pointer loopStartWritePointer, or SHAPE_SRC_COMMAND_TYPE_STOP_IMMEDIATE to stop immediately. For more information, see the SHAPE_SRC_COMMAND_TYPE enumeration.

Requirements

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

See also

Overview of ACP
Overview of Shape
shapepcmcontext
Last modified on August 20, 2026