Skip to main content
提供聊天控件已配置为用于音频输出的首选扬声器或耳机设备。

Syntax

Parameters

audioDeviceSelectionType   PartyAudioDeviceSelectionType*
output
一个输出值,指示用于选择所提供 deviceId 的选择类型。 audioDeviceSelectionContext   PartyString*
library-allocated output
当使用 PartyAudioDeviceSelectionType::NonePartyAudioDeviceSelectionType::SystemDefault 时,audioDeviceSelectionContext 将为空。当使用 PartyAudioDeviceSelectionType::PlatformUserDefaultPartyAudioDeviceSelectionType::Manual 时,audioDeviceSelectionContext 将是先前调用 SetAudioOutput() 时提供的值。字符串的内存保持有效,直到通过 PartyManager::StartProcessingStateChanges() 提供下一个 PartyLocalChatAudioOutputChangedStateChange 或聊天控件被销毁为止。 deviceId   PartyString*
library-allocated output
一个输出值,指示所选音频输出设备的标识符。字符串的内存保持有效,直到通过 PartyManager::StartProcessingStateChanges() 提供下一个 PartyLocalChatAudioOutputChangedStateChange 或聊天控件被销毁为止。

Return value

PartyError 如果调用成功,则返回 c_partyErrorSuccess;否则返回错误代码。可通过 PartyManager::GetErrorMessage() 检索错误代码的可读形式。

Remarks

空的设备标识符字符串表示未选择任何输出。

Requirements

Header: Party.h

See also

PartyLocalChatControl
PartyLocalChatControl::SetAudioOutput
PartyLocalChatControl::GetAudioInput
最后修改于 2026年8月13日