> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GetShapePcmReadPointer

> GetShapePcmReadPointer

# GetShapePcmReadPointer

Gets the read pointer.

## Syntax

```cpp theme={null}
UINT32 GetShapePcmReadPointer(  
         const SHAPE_PCM_CONTEXT* context  
)  
```

### Parameters

*context*   \_In\_\
Type: [SHAPE\_PCM\_CONTEXT\*](/reference/audio/shapepcmcontext/structs/shape_pcm_context)

Pointer to a [SHAPE\_PCM\_CONTEXT](/reference/audio/shapepcmcontext/structs/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](/reference/audio/shapesrccontext/enums/shape_src_command_type) enumeration.

## Requirements

**Header:** shapepcmcontext.h

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[Overview of ACP](/build/console-features/audio/overviews/acp-overview)\
[Overview of Shape](/build/console-features/audio/overviews/shape-overview)\
[shapepcmcontext](/reference/audio/shapepcmcontext/shapepcmcontext_members)


## Related topics

- [ShapePcmContext](/reference/audio/shapepcmcontext/shapepcmcontext_members.md)
- [SetShapePcmReadPointer](/reference/audio/shapepcmcontext/functions/setshapepcmreadpointer.md)
- [GetShapePcmLoopStartOrWritePointer](/reference/audio/shapepcmcontext/functions/getshapepcmloopstartorwritepointer.md)
- [GetShapeDmaReadPointer](/reference/audio/shapedmacontext/functions/getshapedmareadpointer.md)
- [SHAPE_PCM_CONTEXT](/reference/audio/shapepcmcontext/structs/shape_pcm_context.md)
