2

I am trying to find out which output formats are supported by a specific audio device in exclusive mode. To do this, I am using IAudioClient->IsFormatSupported(), which according to the documentation should be usable for this. Unfortunately, it returns AUDCLNT_E_UNSUPPORTED_FORMAT for almost every format I try to pass, except for default 2-channel, 44.1khz audio.

If I actually try to initialize the audioclient, there are however formats that succeed, but which failed in IsFormatSupported().

Just trying to Initialize every format is not an option because this could result in stopping the audio from other applications.

Has anyone else seen this behavior or know if there is another way to find which formats are supported by a specific audio device?

Adion
  • 579
  • 1
  • 9
  • 21

1 Answers1

1

I have seen this behavior as well. It seems like IsFormatSupported will only accept what is marked as 'supported' in the playback device settings in Windows, but Initialize seems to actually end up asking the drivers if it's indeed possible.

In my specific situation, I have a Xoxar HDAV1.3 setup to use HDMI as output. Two playback devices are always available: Speakers and S/PDIF Pass-through Device. If I try, for example, to request 6 channels for the S/PDIF playback device, IsFormatSupported will reject it (in theory, S/PDIF only supports 2, and that's all I can see in the settings), but calling Initialize will succeed and work (it goes out HDMI after all, for which 6 channels is supported). Talk about misleading device names!

I'm afraid there's no real practical way to work around this issue.

Paul
  • 101
  • 2
  • 5