[wdmaudiodev] Re: Vista Audio Mixer / DeviceTopology API - How to enumerate the IPart?

  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 17 Nov 2006 16:16:11 -0500

I will reply to myself, just in case someone is running into the same problem 
as I were.

First, I have downloaded and install the Windows Vista SDK 5744.16384.061003 
and I have now an updated version of the documentation! The function 
GetEndPoint is no more in the documentation which make sense with what I have 
red from this new package.

About Device Topologies API, I should have click right away on "For more 
information, see Device Topologies" 
(ms-help://MS.MSSDK.1033/MS.WinSDK.1033/coreaud/htm/devicetopologies.htm). I 
don't know if it was there, maybe... but this is the thing to read).

This give you the introduction of how things are structured. And you can see 
that there could be many DeviceTopology inside the DeviceTopology API.

I needed to query the topology filter to get access to it.

        hr = pDevice->Activate(__uuidof(IDeviceTopology), CLSCTX_ALL, NULL, 
(void **) &pDevTopoEndpt);

        hr = pDevTopoEndpt->GetConnector(0, &pConnector);
        hr = pConnector->GetConnectedTo(&pConnector2);
        hr = pConnector2->QueryInterface(__uuidof(IPart), (void**)&pPart);
        hr = pPart->GetTopologyObject(&pDevTopology);

        // --- We did get a device topology from the other side of the 
connector ---
        hr = pDevTopology->GetConnectorCount(&uCount2);
        hr = pDevTopology->GetSubunitCount(&uCount3);

This is trivial once you read carefully the link! But if you read the various 
interface without seeing this introduction, you might be puzzled about it.

regards,
Yann



-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx]On Behalf Of Yann Hamiaux
Sent: November 16, 2006 2:30 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Vista Audio Mixer / DeviceTopology API - How to
enumerate the IPart?



Hello,

I try to get access to differents IPart objects using the DeviceTopology API to 
control volume, mute, recording mux, ... In fact, the application is a control 
panel that allow the user to adjust the hardware volume on his sound card. From 
what I have read, I am dealing with the right API which show up the various 
controls in Windows Vista.

To obtain the list of IPart, it's seem that I need first a IPart! So, after 
obtaining the IDeviceTopology from a AudioEndpointDevice.. I got the only 
connector available (no subunit available - and the GetEndpoint cannot be found 
in the .h file, maybe it was not available yet on the july SDK or should be 
remove from the documentation). And I did a QueryInterface from the connector 
to get the IPart.

Then I try to get a part list using EnumPartsIncoming and EnumPartsOutgoing but 
for each of the call I got an error code 0x80070490 (Element not found).

If you do have some experience with the DeviceTopology API, please let me 
know!? Or if there is an application like mixapp.exe was, maybe that could help 
me to know a bit more how to obtain these various interfaces and their 
relation-ship.

regards,
Yann


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

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: