[wdmaudiodev] Re: Enumerating volume controls in Vista

  • From: Andrew Mindrin <wdmaudiodev@xxxxxxxxxxxxxxxxxx>
  • To: Mitchell Rundle <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Thu, 22 Feb 2007 20:30:44 +0400

Thanks Mitch. I will try that. I have yet another question.
While walking the topology using IDeviceTopology for some
volume controls method IPart::GetName returns empty string
without failing. However in the sndvol.exe these controls
have names. What's that mean and how to retrieve real names?

Andrew

Original Message Follows:
-------------------------
You need to walk the topology using IPart::EnumPartsIncoming (for the render 
paths) and IPart::EnumPartsOutgoing (for capture paths).

There is some sample code that shows how to do this at 
http://msdn2.microsoft.com/en-us/library/ms678713.aspx for a capture endpoint.  
Note that the sample doesn't handle branches though.  When EnumPartsIncoming 
returns a partslist with more than 1 part, that indicates a branch in the tree.

Regards,
Mitch

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Andrew Mindrin
Sent: Wednesday, February 21, 2007 9:07 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Enumerating volume controls in Vista

Hello,

I need to enumerate volume controls, i.e. I need to build
the tree:

Volume Group
   Volume
   CD
   AUX
   .. etc

I do the following:

1. Enumerating EndPoints to retrieve IPart (Volume Group)
2. Obtaining IDeviceTopology for each IPart
2. Enumerating volume controls in topology by using GetConnector
   method and querying IPart interface for each connector

All works fine, the problem is when several Volume Groups have the
same topology, i.e. Volume Group 1 and Volume Group 2 have the same
IDeviceTopology object.

The questions is how to determine which controls relate to Volume
Group 1 and which controls relate to Volume Group 2? Or maybe I need
to use another algorithm?

Thanks,
Andrew

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: