Solved

API Mixer functions not working

Posted on 2000-04-06
6
462 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

19 Experts available now in Live!

Get 1:1 Help Now