• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 382
  • Last Modified:

A hard question on matching up mixer device names with multimedia options

I have only 80 points, that makes a "poor" guy ask only "easy" questions :-)

I am working on a multimedia program.

In the program I show some mixer controls for recording/playback. However, when there are multiple mixer devices in the system, I want to show the mixer controls for the current user selected recording/playback devices.

Here is an example, I have two mixer devices, the mixer API mixerGetDevCaps()lists them as

1. ESS AudioDrive Mixer
2. Videum Audio Mixer(0)

Under System/Setting/Multimedia Properties/Audio user can also choose Playback or Recording devices, they are listed as:

Playback, Prefered device:
1. ESS AudioDrive Playback
2. Winnov Videum Wave Playback

Recording, Prefered device:
1. ESS AudioDrive Record
2. Winnov Videum Wave Record

If the user selects ESS AudioDrive Playback, then I need to show speaker volume for mixer ESS AudioDrive Mixer. Same for the recording.

I  figured out that when you click on System/Setting/Multimedia Properties/Audio/Playback or Recording, the selected Playback/recording devices are stored in the registry under CU/software/microsoft/multimedia/sound mapper.

However, I cannot match up the Playback/Recording device names with the mixer device names returned by mixerGetDevCaps() API.

P.S. I also tried to enumerate thru the CLSID_AudioInputDeviceCategory device list. It didn't help, because the list differs from mixerGetDevCaps()API, and the order of the devices also changes based on the user's current selection.

Any help is appreciated.


  • 4
  • 2
1 Solution
ymengAuthor Commented:
Edited text of question.
ymengAuthor Commented:
Adjusted points to 80
For playback, the device names are returned by waveOutGetDevCaps. For recording, they are returned by waveInGetDevCaps. Try matching the wMid and wPid instead of the name.
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

ymengAuthor Commented:
Thanks for the reply.

waveInGetDevCaps() and waveOutGetDevCaps() both return names that match the device names shown in the control panel/Multimedia Properties/Audio section.

However, this is what gets me frustrated: I tested 2 different devices (ESS sound card, and logitech camera) on win98. They both returned the same wMid = 1 (which happens to be Microsoft's wMid.) Although some other devices do return wMid truthfuly.

I am wondering if I am hitting a dead end trying to solve the problem this way.

Let me provide a scenario of what I was trying to achieve (I'll use playback as example only)

1. I read from registry to figure out the user selected playback device (e.g. "ESS AudioDrive Playback", so I need to show the volume control from the ESS mixer in my program)

2. I query mixers using mixerGetDevCaps() (e.g. I got 2 devices "ESS Audio Mixer" and "Logitech Cam Mixer")

3. Based on the names I know "ESS Audio Mixer" is the right mixer. However computer can't use those names to match the them, 'cause the strings are not identical.

So I use waveOutGetDevCaps() to query the playback devices, both devices return the same bogus wMid. I still can't pick the right mixer using wMid.

The only other way I know is to use "fuzzy" logic to match "ESS AuioDrive Playback" with "ESS Audio Mixer(1)". This can be ugly: how do I match "Winnov Videum Playback" with "Videum Audio Mixer(1)" ?

Any new idea is greatly appreciated.


Based on my observation, the order of the wave out devices is the same as the order of the mixer devices. For example, if "ESS AudioDrive Playback" is the device with ID 0, its corresponding mixer device ID should be 0 as well. But I am not 100% sure.

ymengAuthor Commented:
Thanks for your reply again.

I used that assumption before and it didn't work well.

Here is a nasty example: I have an ESS Audio Card, and a logitech camera with a built-in mic. The system counts that as 2 mixers. However, the camera only supports wave-in not wave out, so I've got 2 mixers, but only one wave-out, the index based scheme didn't work in this case.

I appreciate your help.

I am thinking to use some ad-hoc rules to match the names, though I'd really like to find another solution.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now