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

取得每個框架的位元組數目。

## 語法

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

### 參數

*context*   \_In\_\
類型: [SHAPE\_DMA\_CONTEXT\*](/zh-TW/reference/audio/shapedmacontext/structs/shape_dma_context)

[SHAPE\_DMA\_CONTEXT](/zh-TW/reference/audio/shapedmacontext/structs/shape_dma_context) 結構的指標。

### 傳回值

類型: UINT32

每個框架的位元組數目。

## 備註

此函式會將聲道數目乘以每個框架的樣本數，再乘以每個樣本的位元組數，以計算完整框架中的位元組總數。

在直接記憶體存取 (DMA) 緩衝區結構中，驅動程式可以指定每個框架的最大位元組數。傳輸資料時，主機控制器會將資料緩衝區分割成此大小的封包。

## 需求

**標頭：** shapedmacontext.h

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

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


## Related topics

- [GetShapeDmaBytesPerFrame](/reference/audio/shapedmacontext/functions/getshapedmabytesperframe.md)
- [ShapeDmaContext](/reference/audio/shapedmacontext/shapedmacontext_members.md)
