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

# GetShapeDmaBytesPerFrame

> GetShapeDmaBytesPerFrame

# GetShapeDmaBytesPerFrame

Gets the number of bytes per frame.

## Syntax

```cpp theme={null}
UINT32 GetShapeDmaBytesPerFrame(  
         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 per frame.

## Remarks

This function calculates the total number of bytes in a complete frame by multiplying the number of channels by the number of samples per frame and by the number of bytes per sample.

In the Direct Memory Access (DMA) buffer structure, the driver can specify the maximum number of bytes per frame. When transmitting data, the host controller splits the data buffer into packets of this size.

## Requirements

**Header:** shapedmacontext.h

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

## See also

[SHAPE\_DMA\_CONTEXT](/reference/audio/shapedmacontext/structs/shape_dma_context)\
[DMA](/build/console-features/audio/overviews/shape-overview#ID4EWC)\
[ShapeDmaContext](/reference/audio/shapedmacontext/shapedmacontext_members)


## Related topics

- [ShapeDmaContext](/reference/audio/shapedmacontext/shapedmacontext_members.md)
- [GetShapeDmaNumFrames](/reference/audio/shapedmacontext/functions/getshapedmanumframes.md)
- [GetShapeDmaFramesAvailable](/reference/audio/shapedmacontext/functions/getshapedmaframesavailable.md)
- [GetShapeDmaFramesFree](/reference/audio/shapedmacontext/functions/getshapedmaframesfree.md)
- [GetShapeDmaNumBytes](/reference/audio/shapedmacontext/functions/getshapedmanumbytes.md)
