Accessing Xbox Genral Setting->Voice and Audio -> Speaker Format or Headset Format in UWP c# code

Parth Kapadia 1 Reputation point
2020-04-01T10:44:47.113+00:00

Hi,

I want to access Xbox's "Genral Setting->Voice and Audio -> Speaker Format or Headset Format" in uwp c# app. Is there any api available or code available for same?

Thanks for any help.

Thanks

Developer technologies | Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Fay Wang - MSFT 5,226 Reputation points
    2020-04-08T07:27:42.043+00:00

    Hello,

    Welcome to Microsoft Q&A!

    You cannot query these settings directly but you can infer their values by using the following APIs:

    Speaker Settings:

    Using C++: https://learn.microsoft.com/en-us/windows/win32/api/audioclient/nf-audioclient-iaudioclient-getmixformat

    This is a win32 api, you can not directly call it in C# unless you project the calls from C++, you need to p/invoked these APIs in C# from C++ to use it.

    Headset format:

    You can try to use the APIs from this document to infer the value: https://learn.microsoft.com/en-us/uwp/api/windows.media.audio.spatialaudiodeviceconfiguration


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.