Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

API Mixer functions not working

Posted on 2000-04-06
6
465 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
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.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How Does Quick Books store date / time? 3 104
Need example 5 122
SSIS 2010 Convert to SSIS 2013 On Different Box 3 61
What namespace do I need to import? 2 38
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

839 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