Solved

API Mixer functions not working

Posted on 2000-04-06
6
464 Views
Last Modified: 2013-12-03
I'm using some functions from mmsystem.h, mixerOpen(), mixerGetLineInfo(), mixerGetLineControls(), etc. My goal is to toggle the master mute or line-in mute, etc. I've got this working with a SB16 card and I can toggle the Wave out mute, but it doesn't work well with by SB Live card, it reports there are only two controls on the Play Control line - CD Audio Volume and CD Audio Mute. Why do only these controls out of the hundreds on the device show up? And since these are the only functions that can do the job, how can other applications control my volumes on my SB Live card?!
0
Comment
Question by:Loggytronic
  • 3
  • 2
6 Comments
 
LVL 15

Expert Comment

by:NickRepin
ID: 2691828
You have to open the destination line (say, ..._DST_SPEAKERS) and enumerate all controls for it. Among these controls, there must be the master mute.

Then you have to open all source lines (..SRC_LINE, ...SRC_MIC etc) and enumerate controls for each line. You'll find mute control for each line.
0
 

Author Comment

by:Loggytronic
ID: 2691977
Thanks for your comment, I'll investigate it tomorrow.. (it's late here now). But first, could you (or anyone) clarify my thinking on what all the components are..
As I understand it, the hierarchy goes: devices, lines, and controls. After reading the documentation, I thought a device was a particular card, a line was master or wave out or cd audio out or line in etc, and a control was volume value or mute or balance. But having tried it with my SB16 card it seems a device is a particular card, a line is play control or record control, and controls are everything else.
How should I be looking at all this?
0
 
LVL 15

Accepted Solution

by:
NickRepin earned 50 total points
ID: 2692163
Device is a sound card, voice modem etc.

There are destination and source lines.

Several source lines can be associated with the one destination line.
Examples of line: speaker, CD, wave, microphone, auxiliary, line-in etc.

Each line can has none or any number of controls like sliders (volume), switches (mute, 20 db gain) etc.

Destination line usually has a mixer control which allows to attach one or several source lines to the destination one.
Usually mixer control exists only for recording dst lines, like DST_WAVEIN.

For playback dst line, usually the mute control for the each of the src lines is used.

I recommend you to build the sample named the MIXAPP, if I'm not wrong. It's located in the Platform SDK SAMPLES directory, GRAPHICS or MULTIMEDIA subdir (I don't remember).

It's a fully functional mixer app, you can investigate your mixer with it. It displays existing lines, controls etc.
0
Gigs: Get Your Project Delivered by an Expert

Select from 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.

 
LVL 15

Expert Comment

by:NickRepin
ID: 2692167
yes, it's name is mixapp. look for it in the VC samples.
0
 
LVL 23

Expert Comment

by:chensu
ID: 2694938
Also, check out my article at CodeGuru.

Audio Mixer Functions Demo
http://www.codeguru.com/multimedia/ADMixer.shtml
0
 

Author Comment

by:Loggytronic
ID: 2701169
Thanks for all the replies, and thanks for informing me about MIXAPP. Very useful. It seems my SB16 card would list all the volume sliders, mutes, everything as controls on the Play Control Line, whereas the Live card would not. It would list CD Audio Volume and Mute which must be a driver error, because I now successfully go through all the lines connected to the Play Control line and find the controls there.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now