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

# GetShapePcmMode

> GetShapePcmMode

# GetShapePcmMode

获取 PCM 模式。

## 语法

```cpp theme={null}
SHAPE_PCM_MODE GetShapePcmMode(  
         const SHAPE_PCM_CONTEXT* context  
)  
```

### 参数

*context*   \_In\_\
类型：[SHAPE\_PCM\_CONTEXT\*](/reference/audio/shapepcmcontext/structs/shape_pcm_context)

指向 [SHAPE\_PCM\_CONTEXT](/reference/audio/shapepcmcontext/structs/shape_pcm_context) 结构体的指针。

### 返回值

类型：SHAPE\_PCM\_MODE

[SHAPE\_PCM\_MODE](/reference/audio/shapepcmcontext/enums/shape_pcm_mode) 枚举的成员之一。

## 备注

采样率转换器 (SRC) 以单声道或立体声模式运行。脉冲编码调制 (PCM) 数据从内存中读取，并转换为通用的 24 位定点格式以进行采样率转换。根据模式，输出将写入到一个或两个混音缓冲区中。立体声数据以交错的 16 位数据流形式存储在内存中，左声道位于每个 32 位字的最低 16 位，右声道位于最高 16 位。在立体声模式下，PCM 数据被读取并同时解交错。左声道数据（偶数编号的样本）经过处理后输出到一个混音缓冲区，右声道数据（奇数编号的样本）被写入到第二个混音缓冲区。

## 要求

**标头：** shapepcmcontext.h

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

## 另请参阅

[ACP 概述](/build/console-features/audio/overviews/acp-overview)\
[Shape 概述](/build/console-features/audio/overviews/shape-overview)\
[shapepcmcontext](/reference/audio/shapepcmcontext/shapepcmcontext_members)


## Related topics

- [ShapePcmContext](/zh-CN/reference/audio/shapepcmcontext/shapepcmcontext_members.md)
- [SHAPE_PCM_MODE](/zh-CN/reference/audio/shapepcmcontext/enums/shape_pcm_mode.md)
- [SetShapePcmMode](/zh-CN/reference/audio/shapepcmcontext/functions/setshapepcmmode.md)
- [GetShapePcmFormat](/zh-CN/reference/audio/shapepcmcontext/functions/getshapepcmformat.md)
- [GetShapePcmLoopCount](/zh-CN/reference/audio/shapepcmcontext/functions/getshapepcmloopcount.md)
