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

# PartyChatControl::ConfigureAudioManipulationVoiceStream

> 将异步操作排队,以配置与此聊天控件关联的音频操作语音流。

将异步操作排队,以配置与此聊天控件关联的音频操作语音流。

## 语法

```cpp theme={null}
PartyError ConfigureAudioManipulationVoiceStream(  
    PartyAudioManipulationSourceStreamConfiguration* configuration,  
    void* asyncIdentifier  
)  
```

### 参数

**`configuration`**   [PartyAudioManipulationSourceStreamConfiguration\*](/services/playfab/multiplayer/networking/reference/structs/partyaudiomanipulationsourcestreamconfiguration)
*可选*

流配置。

**`asyncIdentifier`**   void\*
*可选*

一个可选的、由应用定义的指针大小的上下文值,可用于将完成状态更改与此调用相关联。

### 返回值

PartyError

如果调用成功,则返回 `c_partyErrorSuccess`;否则返回错误代码。可以通过 [PartyManager::GetErrorMessage()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage) 检索错误代码的人类可读形式。

## 备注

如果 configuration 非空,则将为此聊天控件创建一个音频操作语音流。这样的流会重定向与此聊天控件关联的语音音频的输出;应用可以使用源流来检索语音音频并通过游戏逻辑路由它,而不是让库自动处理并路由语音音频。如果 configuration 为 null 且之前配置过语音流,则该语音流将被销毁。<br /><br /> 在异步操作完成后,如果指定了非空配置,则可以通过 [PartyChatControl::GetAudioManipulationVoiceStream()](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getaudiomanipulationvoicestream) 查询此聊天控件的语音流。完成通过 [PartyConfigureAudioManipulationVoiceStreamCompletedStateChange](/services/playfab/multiplayer/networking/reference/structs/partyconfigureaudiomanipulationvoicestreamcompletedstatechange) 表示。

### 平台支持和支持的格式

此函数仅在 Windows、XBOX 和 PlayStation® 5 上受支持。在其他平台上的调用将失败。<br /><br /> Windows 和 XBOX 支持以下格式选项。<br />

| 格式选项    | 本地聊天控件支持的值                    | 远程聊天控件支持的值                      |
| ------- | ----------------------------- | ------------------------------- |
| 每秒采样数   | 24 kHz                        | 24 kHz                          |
| 通道掩码    | 0                             | 0                               |
| 通道计数    | 1                             | 1                               |
| 每个采样的位数 | 32                            | 16                              |
| 采样类型    | `PartyAudioSampleType::Float` | `PartyAudioSampleType::Integer` |
| 交错      | false                         | false                           |

<br /><br /> 有关 PlayStation® 5 支持的格式选项列表,请参阅随 Party 库包一起分发的 README-RealTimeAudioManipulation.md 文档。

## 要求

\*\*头文件:\*\*Party.h

## 另请参阅

[PartyChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/partychatcontrol)


## Related topics

- [PartyConfigureAudioManipulationVoiceStreamCompletedStateChange](/zh-CN/services/playfab/multiplayer/networking/reference/structs/partyconfigureaudiomanipulationvoicestreamcompletedstatechange.md)
- [PartyAudioManipulationSourceStreamConfiguration](/zh-CN/services/playfab/multiplayer/networking/reference/structs/partyaudiomanipulationsourcestreamconfiguration.md)
- [PartyAudioManipulationSourceStream::GetConfiguration](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyAudioManipulationSourceStream/methods/partyaudiomanipulationsourcestream_getconfiguration.md)
- [PartyAudioManipulationSourceStream::GetFormat](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyAudioManipulationSourceStream/methods/partyaudiomanipulationsourcestream_getformat.md)
- [使用实时音频操作应用自定义语音效果](/zh-CN/services/playfab/community/voice-communications/concepts-realtime-audio-manipulation.md)
