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

# GetShapeDmaNumBytes

> GetShapeDmaNumBytes

# GetShapeDmaNumBytes

取得音訊緩衝區中的位元組數目。

## 語法

```cpp theme={null}
UINT32 GetShapeDmaNumBytes(  
         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) 緩衝區的完整大小 (以位元組為單位) 計算方式如下:

```cpp theme={null}
fullBufferSizeInBytes = 128 * 4 * numChannels * numFrames  
```

DMA 緩衝區是循環緩衝區，包含 128 個樣本區塊的非交錯樣本。每個樣本都是 32 位元浮點值或 32 位元帶正負號整數。

如需 DMA 的詳細資訊，請參閱 [SHAPE 概觀](/zh-TW/build/console-features/audio/overviews/shape-overview)的 [DMA](/zh-TW/build/console-features/audio/overviews/shape-overview#ID4EWC) 一節。

## 需求

**標頭:** shapedmacontext.h

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

## 另請參閱

[ShapeDmaContext](/zh-TW/reference/audio/shapedmacontext/shapedmacontext_members)


## Related topics

- [GetShapeDmaNumBytes](/reference/audio/shapedmacontext/functions/getshapedmanumbytes.md)
- [ShapeDmaContext](/reference/audio/shapedmacontext/shapedmacontext_members.md)
