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

# GetShapeDmaNumBytes

> GetShapeDmaNumBytes

# GetShapeDmaNumBytes

Gets the number of bytes in the audio buffer.

## Syntax

```cpp theme={null}
UINT32 GetShapeDmaNumBytes(  
         const SHAPE_DMA_CONTEXT* context  
)  
```

### Parameters

*context*   \_In\_\
Type: [SHAPE\_DMA\_CONTEXT\*](/reference/audio/shapedmacontext/structs/shape_dma_context)

Pointer to a [SHAPE\_DMA\_CONTEXT](/reference/audio/shapedmacontext/structs/shape_dma_context) structure.

### Return value

Type: UINT32

Number of bytes in the audio buffer.

## Remarks

The full size of the Direct Memory Access (DMA) buffer (in bytes) is calculated as follows:

```cpp theme={null}
fullBufferSizeInBytes = 128 * 4 * numChannels * numFrames  
```

DMA buffers are circular and contain de-interleaved samples in 128-sample blocks. Each sample is either a 32-bit floating-point value or a 32-bit signed integer.

For more information about DMA, see the [DMA](/build/console-features/audio/overviews/shape-overview#ID4EWC) section of [Overview of SHAPE](/build/console-features/audio/overviews/shape-overview).

## Requirements

**Header:** shapedmacontext.h

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

## See also

[ShapeDmaContext](/reference/audio/shapedmacontext/shapedmacontext_members)


## Related topics

- [ShapeDmaContext](/reference/audio/shapedmacontext/shapedmacontext_members.md)
- [GetShapeDmaNumChannels](/reference/audio/shapedmacontext/functions/getshapedmanumchannels.md)
- [GetShapeDmaNumFrames](/reference/audio/shapedmacontext/functions/getshapedmanumframes.md)
- [GetShapeDmaBytesPerFrame](/reference/audio/shapedmacontext/functions/getshapedmabytesperframe.md)
- [GetShapeXmaOutputBufferNumBytesAvailable](/reference/audio/shapexmacontext/functions/getshapexmaoutputbuffernumbytesavailable.md)
