Re: Access vista component devices of playback devices like microphone, linein, front mic etc in vc++



On Aug 1, 5:39 pm, "Chris P." <m...@xxxxxxxxxxxx> wrote:
On Thu, 31 Jul 2008 21:40:04 -0700 (PDT), vinaykabadi wrote:
I have used IPart and IPartlist by this I am able to access the
subunits of capture devices like microphone boost etc, but I am not
able to access the sub components of rendering device i.e speakers.

If you can tell me the exact functions and Api's I would be thankfull
to you

Enurmerating output endpoints is exactly the same except there is no Mux.

--http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]



IMMDeviceEnumerator *pEnumerator = NULL;
IMMDeviceCollection *pCollection = NULL;

hr = CoInitialize(NULL);

hr = CoCreateInstance(CLSID_MMDeviceEnumerator, NULL,CLSCTX_ALL,
IID_IMMDeviceEnumerator,
(void**)&pEnumerator);

hr = pEnumerator->EnumAudioEndpoints(eRender, DEVICE_STATE_ACTIVE,
&pCollection);

UINT count;
hr = pCollection->GetCount(&count);

for (ULONG i = 0; i < count; i++) {

hr = pCollection->Item(i, &pEndpoint);


"pEndpoint" has the pointer to speaker endpoint device. Now I need to
access its components like microphone, front mic, line in, rear ,
front etc.

Which functions and class objects I need to use to access these
components
.


Loading