PartyLocalChatControl::GetAudioOutput
提供聊天控件已配置为用于音频输出的首选扬声器或耳机设备。
语法
PartyError GetAudioOutput(
PartyAudioDeviceSelectionType* audioDeviceSelectionType,
PartyString* audioDeviceSelectionContext,
PartyString* deviceId
)
参数
audioDeviceSelectionType
PartyAudioDeviceSelectionType*
输出
一个输出值,该值指示用于选择所提供的 deviceId
的选择类型。
audioDeviceSelectionContext
PartyString*
库分配的输出
使用PartyAudioDeviceSelectionType::None 或 PartyAudioDeviceSelectionType::SystemDefault, audioDeviceSelectionContext
将被忽略。 使用 PartyAudioDeviceSelectionType::P latformUserDefault 或 PartyAudioDeviceSelectionType::Manual时, audioDeviceSelectionContext
将是之前调用 SetAudioOutput()中提供的值。 字符串的内存将保持有效,直到下一个 PartyLocalChatAudioOutputChangedStateChange 通过 PartyManager::StartProcessingStateChanges() 或聊天控件被销毁提供。
deviceId
PartyString*
库分配的输出
一个输出值,指示所选音频输出设备的标识符。 字符串的内存将保持有效,直到下一个 PartyLocalChatAudioOutputChangedStateChange 通过 PartyManager::StartProcessingStateChanges() 或聊天控件被销毁提供。
返回值
PartyError
如果调用成功,则为 c_partyErrorSuccess
,否则为错误代码。 可通过 PartyManager::GetErrorMessage() 检索错误代码的可读形式。
备注
一个空的设备标识符字符串指示尚未选择任何输出。
要求
标题: Party.h
另请参阅
PartyLocalChatControl
PartyLocalChatControl::SetAudioOutput
PartyLocalChatControl::GetAudioInput