Identifying subunits
Hi,
My system has a RealTek HD onboard. Vista shows that the microphone endpoine has a microphone boost controller. I am writing an app that tries to identify this microphone boost controller. The subunit type I get from the mic boost IPart instance is KSNODETYPE_VOLUME. In the same topology also resides the microphone endpoint volume controller. I need to distinguish a mic boost subunit from the endpoint volume controller subunit. Is there a reliable way to do this that will work for all audio devices and all languages?
Thanks,
You can use IPart::GetName to see what the driver calls the part - sometimes this is clear ("Mic Boost").
http://msdn2.microsoft.com/en-us/library/ms679058.aspx
Be aware, some mic boosts are exposed as KSNODETYPE_LOUDNESS subunit types rather than _VOLUME.
http://msdn2.microsoft.com/en-us/library/ms789818.aspx
What I would suggest doing is finding all the KSNODTYPE_VOLUME nodes in the path; using IAudioEndpointVolume :: SetMasterVolumeLevel to change the endpoint volume; and seeing which KSNODETYPE_VOLUME was affected. That's the endpoint volume controller, and that strategy should work for all audio devices.