SetShapePcmReadPointer
Sets the read pointer.Syntax
Parameters
context _Inout_Type: SHAPE_PCM_CONTEXT* Pointer to a SHAPE_PCM_CONTEXT structure. readPointerInSamples
Type: UINT32 Read pointer in samples. This pointer treats two 16-bit stereo samples as a single 32-bit sample.
Return value
Type: HRESULT HRESULT success or error code.Remarks
You can prevent blocked Direct Memory Access (DMA) commands by ensuring 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 theSHAPE_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 consolesSee also
Overview of ACPOverview of Shape
shapepcmcontext
