IAudioClient::IsFormatSupported api is not correct return value for AUDCLNT_SHAREMODE_SHARED mode RRS feed

  • Question

  • I want to get support format list of my microphone just like voice control display.

    I can choice  "2 channel, 16-bit, 48000 Hz" or "2 channel, 16-bit, 44100 Hz" format on my microphone advanced page.

    But I use IsFormatSupported function try these two formats, but return S_OK only when I set the format which I set on my microphone advanced page.

    How can I get support format list?

    thanks for your help.

    Thursday, November 14, 2019 12:01 PM

All replies

  • IsFormatSupported only returns S_OK for the format which you set in the control panel because that's the format you set in the control panel.

    That is, the user has control over which format applications get to use.

    If you want to override this choice in your application, you can try setting the AUDCLNT_STREAMOPTIONS_MATCH_FORMAT flag in the AudioClientProperties.Options field in your call to IAudioClient2::SetClientProperties.

    But you shouldn't do this unless you have a really good reason to override the user's choice. Do you? If so, what is it?

    Matthew van Eerde

    Friday, November 15, 2019 5:14 PM