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

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

## 語法

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

### 參數

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

[SHAPE\_DMA\_CONTEXT](https://docs.xbox.com/zh-TW/reference/audio/shapedmacontext/structs/shape_dma_context.md) 結構的指標。

### 傳回值

類型: UINT32

每個框架的位元組數目。

## 備註

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

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

## 需求

**標頭：** shapedmacontext.h

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

## 另請參閱

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


## Related topics

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