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

获取每帧的字节数。

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

指向 [SHAPE\_DMA\_CONTEXT](/reference/audio/shapedmacontext/structs/shape_dma_context) 结构的指针。

### Return value

Type: UINT32

每帧的字节数。

## Remarks

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

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

## Requirements

**头文件:** shapedmacontext.h

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

## 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](/zh-CN/reference/audio/shapedmacontext/shapedmacontext_members.md)
- [GetShapeDmaNumBytes](/zh-CN/reference/audio/shapedmacontext/functions/getshapedmanumbytes.md)
- [GetShapeDmaFramesAvailable](/zh-CN/reference/audio/shapedmacontext/functions/getshapedmaframesavailable.md)
- [GetShapeDmaFramesFree](/zh-CN/reference/audio/shapedmacontext/functions/getshapedmaframesfree.md)
- [GetShapeDmaNumFrames](/zh-CN/reference/audio/shapedmacontext/functions/getshapedmanumframes.md)
