The documentation for PartyLocalChatControl::SetAudioInput (as well as SetAudioOutput) states that when using Manual selection then the audioDeviceSelectionContext parameter must be the non-null, non-empty identifier of the audio device.
In the absence of any PlayFab functions to enumerate audio devices I'm guessing I would have to use something like IMMDeviceEnumerator::EnumAudioEndpoints to retrieve the devices' Endpoint ID Strings and use one as the audioDeviceSelectionContext parameter.
The problem I see with this is is that the Endpoint ID String is a wide-character string, while audioDeviceSelectionContext is a PartyString (which is not wide-character). Of course I could convert it, but I'd like to have some confirmation first that this is what is expected on the Windows platform.
Also the documentation says to treat the Endpoint ID String as opaque so I have no reason to assume this would work.
Answer by Citrus Yan · Dec 01, 2020 at 06:26 AM
Party accepts a narrow(UTF8) string, you can convert the wide string returned from IMMDevice::Get to UTF8 with something like WideCharToMultibyte. And, on Windows 10, Party also accepts a Windows.Media.Device identifier, here is table on the following page detailing what identifier formats are accepted: Understanding How PlayFab Party chat works - PlayFab | Microsoft Docs
In addition, it's strongly recommended that you use PartyAudioDeviceSelectionType::SystemDefault on Windows as that'll tell Party to automatically choose the audio device configured as the default communications device, without the hassle of specifying it by yourself.