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

# GetShapeDmaFloatSamples

> GetShapeDmaFloatSamples

# GetShapeDmaFloatSamples

获取标志,指示音频缓冲区中的采样是包含浮点数据还是 32 位整数数据。

## Syntax

```cpp theme={null}
bool GetShapeDmaFloatSamples(  
         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: bool

浮点标志:1 == 浮点数据;0 == 32 位整数数据。

## Remarks

直接内存访问 (DMA) 系统支持读写功能,并具备浮点与整数之间的自动转换。DMA 系统使用循环缓冲区,该缓冲区包含以 128 个采样为一块的去交错采样。

DMA 处理器允许可扩展硬件音频处理引擎 (SHAPE) 将数据从混合缓冲区发送到主系统内存,并将数据从主系统提取到混合缓冲区以供进一步处理。DMA 以块为单位进行,一次传输一个音频帧的数据。为便于对块交错数据的处理,通过跳跃值指定在读取或写入采样时(从基地址开始)要跳过的系统内存中音频帧块的数量。因此,多声道流每个声道都需要一个 DMA 上下文。

音频数据采样始终以 32 位值进行读写,根据 [SHAPE\_DMA\_CONTEXT](/reference/audio/shapedmacontext/structs/shape_dma_context) 结构的 `floatConvert` 标志的指定,可以是整数或浮点数。请注意,DMA 的方向(读或写)是在 DMA 命令中指定的,而不是在 DMA 上下文中。这有助于减少数据带宽的占用。DMA 引擎不具备信号处理能力,但可以执行浮点到整数(或整数到浮点)的转换。这使应用程序 CPU 能够以浮点格式处理数据采样。

## Requirements

**头文件:** shapedmacontext.h

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

## See also

[SHAPE 概述](/build/console-features/audio/overviews/shape-overview)\
[ShapeDmaContext](/reference/audio/shapedmacontext/shapedmacontext_members)


## Related topics

- [ShapeDmaContext](/zh-CN/reference/audio/shapedmacontext/shapedmacontext_members.md)
- [SetShapeDmaFloatSamples](/zh-CN/reference/audio/shapedmacontext/functions/setshapedmafloatsamples.md)
- [GetShapeDmaPeakMagnitude](/zh-CN/reference/audio/shapedmacontext/functions/getshapedmapeakmagnitude.md)
- [GetShapeDmaMixBufferPeakMagnitude](/zh-CN/reference/audio/shapedmacontext/functions/getshapedmamixbufferpeakmagnitude.md)
- [GetShapeDmaChannel](/zh-CN/reference/audio/shapedmacontext/functions/getshapedmachannel.md)
