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

# GetShapeDmaBytesPerFrame

> GetShapeDmaBytesPerFrame

# GetShapeDmaBytesPerFrame

获取每帧的字节数。

## Syntax

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

### Parameters

*context*   \_In\_\
Type: [SHAPE\_DMA\_CONTEXT\*](https://docs.xbox.com/zh-CN/reference/audio/shapedmacontext/structs/shape_dma_context.md)

指向 [SHAPE\_DMA\_CONTEXT](https://docs.xbox.com/zh-CN/reference/audio/shapedmacontext/structs/shape_dma_context.md) 结构的指针。

### Return value

Type: UINT32

每帧的字节数。

## Remarks

此函数通过将声道数乘以每帧采样数,再乘以每个采样的字节数,来计算一个完整帧中的总字节数。

在直接内存访问 (DMA) 缓冲区结构中,驱动程序可以指定每帧的最大字节数。传输数据时,主机控制器会将数据缓冲区拆分为此大小的数据包。

## Requirements

**头文件:** shapedmacontext.h

**支持的平台:** XBOX One 系列主机和 XBOX Series 主机

## See also

[SHAPE\_DMA\_CONTEXT](https://docs.xbox.com/zh-CN/reference/audio/shapedmacontext/structs/shape_dma_context.md)\
[DMA](https://docs.xbox.com/zh-CN/build/console-features/audio/overviews/shape-overview.md#ID4EWC)\
[ShapeDmaContext](https://docs.xbox.com/zh-CN/reference/audio/shapedmacontext/shapedmacontext_members.md)


## Related topics

- [ShapeDmaContext](https://docs.xbox.com/zh-CN/reference/audio/shapedmacontext/shapedmacontext_members.md)
- [GetShapeDmaNumBytes](https://docs.xbox.com/zh-CN/reference/audio/shapedmacontext/functions/getshapedmanumbytes.md)
- [GetShapeDmaNumFrames](https://docs.xbox.com/zh-CN/reference/audio/shapedmacontext/functions/getshapedmanumframes.md)
- [GetShapeDmaFramesAvailable](https://docs.xbox.com/zh-CN/reference/audio/shapedmacontext/functions/getshapedmaframesavailable.md)
- [GetShapeDmaFramesFree](https://docs.xbox.com/zh-CN/reference/audio/shapedmacontext/functions/getshapedmaframesfree.md)
