How to get a sound capture's GUID and Displayname?

How to get a sound capture's GUID and Displayname?

Post by aachen » Fri, 12 Sep 2003 18:09:01


Hi all!

In our project, I have to use a sound capture's GUID and
Displayname at the same time. I got the GUID by using
DirectSound's method DirectSoundCaptureEnumerate() and the
Displayname through DirectShow's method
ICreateDevEnum::CreateClassEnumerator(). But when I have
several sound captures, these two method both got a set of
devices, thus I don't know which GUID correspond to which
Displayname.
How can I get the same sound capture's GUID and
Displayname at the same time?

Thanks a lot,
aachenG
 
 
 

How to get a sound capture's GUID and Displayname?

Post by Rajiv Da » Fri, 12 Sep 2003 21:05:57

Get the guid from DirectSoundCaptureEnumerate and put that as input to
CreateClassEnumerator.BTW where are you getting the guid to be input in
CreateClassEnumerator?

--
Cheers,
[Rajiv Das]


| Hi all!
|
| In our project, I have to use a sound capture's GUID and
| Displayname at the same time. I got the GUID by using
| DirectSound's method DirectSoundCaptureEnumerate() and the
| Displayname through DirectShow's method
| ICreateDevEnum::CreateClassEnumerator(). But when I have
| several sound captures, these two method both got a set of
| devices, thus I don't know which GUID correspond to which
| Displayname.
| How can I get the same sound capture's GUID and
| Displayname at the same time?
|
| Thanks a lot,
| aachenG

 
 
 

How to get a sound capture's GUID and Displayname?

Post by aachen » Fri, 12 Sep 2003 22:58:00

The GUID got from DirectSoundCaptureEnumerate is the
identifier of the unique device in the machine, and can be
passed to DirectSoundCaptureCreate to create an
IDirectSoundCapture, which is used later in my project.
While the GUID passed to the
ICreateDevEnum::CreateClassEnumerator is one of the CLSIDs
for the standard filter categories, and I pass the
CLSID_AudioInputDeviceCategory, which can be got from the
MSDN "Filter Categories", to the function to get an
IEnumMoniker that represents a set of sound captures. At
last I use IEnumMoniker to get an IMoniker which can
supply me a displayname of a unique device.

that as input to
to be input in