PartyLocalChatControl::GetAudioInput

提供聊天控件已配置为用于音频输入的首选麦克风或录制设备。

语法

PartyError GetAudioInput(  
    PartyAudioDeviceSelectionType* audioDeviceSelectionType,  
    PartyString* audioDeviceSelectionContext,  
    PartyString* deviceId  
)  

参数

audioDeviceSelectionType PartyAudioDeviceSelectionType*
输出

一个输出值,该值指示用于选择所提供的 deviceId的选择类型。

audioDeviceSelectionContext PartyString*
库分配的输出

使用PartyAudioDeviceSelectionType::NonePartyAudioDeviceSelectionType::SystemDefaultaudioDeviceSelectionContext 将被忽略。 使用 PartyAudioDeviceSelectionType::PlatformUserDefaultPartyAudioDeviceSelectionType::Manual时, audioDeviceSelectionContext 将是之前调用 SetAudioInput()中提供的值。 字符串的内存将保持有效,直到通过 PartyManager::StartProcessingStateChanges()或销毁聊天控件来提供下一PartyLocalChatAudioInputChangedStateChange

deviceId PartyString*
库分配的输出

一个输出值,指示所选音频输入设备的标识符。 字符串的内存将保持有效,直到通过 PartyManager::StartProcessingStateChanges()或销毁聊天控件来提供下一PartyLocalChatAudioInputChangedStateChange

返回值

PartyError

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

备注

一个空的设备标识符字符串指示尚未选择任何输入。

要求

标题: Party.h

另请参阅

PartyLocalChatControl
PartyLocalChatControl::SetAudioInput
PartyLocalChatControl::GetAudioOutput