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

# 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\*](https://docs.xbox.com/reference/audio/shapedmacontext/structs/shape_dma_context.md)

Pointer to a [SHAPE\_DMA\_CONTEXT](https://docs.xbox.com/reference/audio/shapedmacontext/structs/shape_dma_context.md) 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](https://docs.xbox.com/build/console-features/audio/overviews/shape-overview.md#ID4EWC) section of [Overview of SHAPE](https://docs.xbox.com/build/console-features/audio/overviews/shape-overview.md).

## Requirements

**Header:** shapedmacontext.h

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

## See also

[ShapeDmaContext](https://docs.xbox.com/reference/audio/shapedmacontext/shapedmacontext_members.md)


## Related topics

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