Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Arthur Firmino · Nov 24, 2020 at 03:10 PM · apis

Audio device identifier format on Windows platform

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.

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

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.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    How to grant multiple stackable items in one call? 1 Answer

    Server GetUserAccountInfo with FriendTitleDisplayName 1 Answer

    Is it possible to execute Admin API calls via CloudScript? 1 Answer

    UserData object different between client and server? 1 Answer

    ListGroupMembers() for nonmember 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges