WASAPI IsFormatSupported and exclusive

Hello

Im getting tired of googling about WASAPI and only finding hits on my OWN code :)

What are we supposed to do if we want to do exclusive mode and IsFormatSupported just returnsAUDCLNT_E_UNSUPPORTED_FORMAT,and doesnt even provide a "closet match".Are we supposed to try all millions of permutations of members in WAVEFORMATEX(TENSIBLE), andat the end, after failing all of them, realise that this device doesnt do Exclusive at all?

I dont know about you but i would kind of like to get the equivalent of GetMixFormat from an exclusive mode device, at least its "prefered" internal format.

Cheers

[1322 byte] By [plgDavid] at [2008-2-8]
# 1

Unfortunately, NT's audio driver model doesn't provide a way of enumerating the formats supported by an audio device. You're best bet is to enumerate the formats you can render and try them in turn.

There's no such thing as an "exclusive mode device" - audio devices are opened in either shared or exclusive mode. So the mix format is always valid for all audio devices. Normally the mix format should always work for any audio device (but not always, it's possible that a vendor has a custom GFX that converts between the mix format and a format supported by the audio card).

The Windows Logo requirements REQUIRE that all WHQL audio devices support 48kHz, so 48kHz PCM is almost always a safe bet.

LarryOsterman at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Vista Pro-Audio Application Development...
# 2
Hello.

And thanks for the added info.
Sorry about the shared vs exclusive device, i dont know why i wrote this, i was aware of this.

Yes today i started to add an iterative IsFormatSupported bit to my code.
Ill have more questions soon afterwards.. for other issues.

Only so few drivers to try....

Cheers

plgDavid at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Vista Pro-Audio Application Development...
# 3

Hi Larry,

I am in the situation as what you said of "but not always, it's possible that a vendor has a custom GFX that converts between the mix format and a format supported by the audio card". I can not allow Vista mixing or filtering my data. I don't have solution yet. I heard that current Vista audio driver does not support exclusive-mode yet. In fact, from control-menu you can set a specific audio device as exclusive mode. But it does not work for me.

Any help?

Thanks in advance!

Fortemedia

fortemedia at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Vista Pro-Audio Application Development...
# 4

There are two options on that control panel - the first enables or disables exclusive mode - in other words, a user can prevent an application from taking exclusive control of their audio hardware. The second option describes what happens when an application attempts to open the endpoint in exclusive mode when another application is streaming to the endpoint. If the option is checked, then the exclusive mode open will pre-empt the shared mode open (which means that any app that is currently playing audio will stop working). If the option is not checked, then the exclusive mode open will fail.

LarryOsterman at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Vista Pro-Audio Application Development...

Software Development for Windows Vista

Site Classified