Solved

API Mixer functions not working

Posted on 2000-04-06
6
466 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get a List of Executing Stored Procedures on Sql Server 2008 R2 5 65
Slow process to read Excel 15 148
Recommendation vb6 to vb.net or others 14 205
Please explain purpose of GZIP 4 59
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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