views:

69

answers:

1

I'm getting very confused about how audio devices/lines/endpoints are named in windows (vista).

  • First I go to the control panel applet "Sound". Among others, I find one input line that resides physically on a USB Audio Device. The name of the "recording device" in the applet is:
    Microphone
    3- USB Audio Device Working

  • From the waveInGetDeviceCaps I get
    Microphone (3- USB Audio Device please note the lack of closing parenthesis

  • From the IMMDevice.IPropertyStore, I see two properties that I can extract name. One of them says
    Microphone
    and the other says USB Audio Device

Where does that "3- " comes from?

+1  A: 

The "3-" depends on the USB port you connect the device to. If you move the device to another USB port it will get another number. This is to uniquely identify the same devices connected to different ports. The CoreAudio API uses a true ID (much like a GUID) to identify each device, so it doesn't need to encode the differences in the device name.

Mind you, this is my take on using USB sound devices and the MME and CoreAudio APIs. The true story can probably be found in the DDK, or from the folks a Microsoft.

Han
Almost completely right - : The 3- is a disambiguator applied by the audio subsystem to differentiate between identically named devices. When we build the endpoint name, we look at a number of factors - the endpoint formfactor creates the "Microphone", "Speakers", "Line-In", etc part of the name and the manufacturer name creates the "USB Audio Device" part. If the system finds multiple endpoints with the same name, it disambiguates them by putting "<n>-" in front of the name.
Larry Osterman