> ## 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.

# SHAPE_PCM_CONTEXT

> SHAPE_PCM_CONTEXT

# SHAPE\_PCM\_CONTEXT

The PCM context structure.

## Syntax

```cpp theme={null}
typedef struct SHAPE_PCM_CONTEXT {
    UINT32 bufferStart : 32;  
    UINT32 bufferLength : 21;  
    UINT32 reserved0 : 11;  
    UINT32 loopCount : 8;  
    UINT32 reserved1 : 8;  
    UINT32 full : 1;  
    UINT32 reserved2 : 15;  
    UINT32 readPointer : 21;  
    UINT32 reserved3 : 11;  
    UINT32 loopStartWritePointer : 21;  
    UINT32 reserved4 : 11;  
    UINT32 loopEnd : 21;  
    UINT32 reserved5 : 11;  
    UINT32 mode : 1;  
    UINT32 reserved6 : 15;  
    UINT32 format : 2;  
    UINT32 reserved7 : 14;  
    UINT32 reserved[1];  
} SHAPE_PCM_CONTEXT  
```

### Members

*bufferStart*\
Type: UINT32

Write: Audio buffer.

*bufferLength*\
Type: UINT32

Write: Length of the audio buffer in samples.

*reserved0*\
Type: UINT32

Reserved.

*loopCount*\
Type: UINT32

Read/Write: Loop count.

*reserved1*\
Type: UINT32

Reserved.

*full*\
Type: UINT32

Write: For circular buffers, when *readPointer* is the same as *loopStartWritePointer*: 1 == full buffer, 0 == empty buffer.

*reserved2*\
Type: UINT32

Reserved.

*readPointer*\
Type: UINT32

Read/Write: Frame-aligned, 128-sample offset in samples from the beginning of the audio buffer. Lower seven (7) bits are ignored.

*reserved3*\
Type: UINT32

Reserved.

*loopStartWritePointer*\
Type: UINT32

Write: Non-frame–aligned sample offset from the beginning of the audio buffer. Indicates the loop start for linear buffers, or the write pointer for circular buffers.

*reserved4*\
Type: UINT32

Reserved.

*loopEnd*\
Type: UINT32

Write: Non-frame–aligned sample offset from the beginning of the audio buffer. Indicates the loop end. Minimum loop size is 128 samples.

*reserved5*\
Type: UINT32

Reserved.

*mode*\
Type: UINT32

Write: SHAPE\_PCM\_MODE

*reserved6*\
Type: UINT32

Reserved.

*format*\
Type: UINT32

Write: SHAPE\_PCM\_FORMAT

*reserved7*\
Type: UINT32

Reserved.

*reserved*\
Type: UINT32\[1]

Reserved.

## Remarks

The fields marked as **Write** are set by your application and are not changed by the Audio Control Processor (ACP) library. The fields marked as **Read/Write** are set by your application but can be changed by the ACP library.

The size of a Pulse Code Modulation (PCM) buffer depends on the buffer's format. See the remarks for [SHAPE\_PCM\_FORMAT](/reference/audio/shapepcmcontext/enums/shape_pcm_format).

## Requirements

**Header:** shapepcmcontext.h

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

## Conceptual documentation

* [ACP overview](/build/console-features/audio/overviews/acp-overview)

## 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)
- [SetShapePcmFormat](/reference/audio/shapepcmcontext/functions/setshapepcmformat.md)
- [SetShapePcmMode](/reference/audio/shapepcmcontext/functions/setshapepcmmode.md)
- [GetShapePcmFormat](/reference/audio/shapepcmcontext/functions/getshapepcmformat.md)
- [GetShapePcmMode](/reference/audio/shapepcmcontext/functions/getshapepcmmode.md)
