Solved

Multemedia mixer question

Posted on 1998-10-03
3
584 Views
Last Modified: 2013-12-03
I am writing an application that uses the mixer API.  I intercept the MM_MIXM_CONTROL_CHANGE message to know when the a mixer control has been changed.

I'm particularly interested in the Line-In control, but all of them should be the same.  Looking at the volume applet there is the "volume" slider which controls the level at which the signal enters the mixer.  There is the "mute" button that stops the signal from reaching the speakers, but the signal can still be recorded unto a wave file.

So far so good, I can easily check when either of these controls changes state.

If you go to Options->Properties you can select  the Recording controls.  Here there is the slider again, which is exactly the same slider as in the Playback controls.  There is also a "select" button.  As far as I can tell "select" completely blocks the signal from comming into the system at all.  You can't hear or record it.

This is where my problem is.  I can't figure out how to tell when the select button is pressed.  There doesn't seem to be a control associated with it in the mixer API.  Changing it does send two MM_MIXM_CONTROL_CHANGE message, the lParam (which indicates the control) is first 0, then 1.  Funny thing is that ALL the select buttons send the same exact lParam's even though they are clearly different in functionality.

Is there any way to tell when these buttons are toggled?
0
Comment
Question by:carlosn
3 Comments
 
LVL 20

Expert Comment

by:Madshi
ID: 1414963
Carlos,

I think these two messages should be what you need. But don't ask me how to extract the information you need from this messages. I guess the message with lParam=0 is the message that one select button was released and the message with lParam=1 is the message that another one was pressed. But I don't know from where you can get the control ID.
The problem is: the mixer of each and every sound card/driver is completely different. So I can't reproduce your situation with my mixer...   :-(

Regards, Madshi.
0
 
LVL 23

Accepted Solution

by:
chensu earned 200 total points
ID: 1414964
There is nothing wrong. They are not seperated controls. Instead, they belong to one control that is a List Control. Check out the Win32 Multimedia Sample "Mixapp: Sample Mixer Application". Run it and check the Wave Input DST line, which has the List Control. In order to tell which Select is checked, you need to retreive the state of the control by calling mixerGetControlDetails after receiving the MM_MIXM_CONTROL_CHANGE messages. The following information is useful for you.

typedef struct {
    DWORD dwParam1;
    DWORD dwParam2;
    CHAR  szName[MIXER_LONG_NAME_CHARS];
} MIXERCONTROLDETAILS_LISTTEXT;
 
Members
dwParam1 and dwParam2

Control class-specific values. The following control types are listed with their corresponding values:

EQUALIZER

MIXERCONTROL.Bounds dwMinimum member.

MIXER and MUX

MIXERLINE dwLineID member.

MULTIPLESELECT and SINGLESELECT

Undefined; must be zero

0
 
LVL 1

Author Comment

by:carlosn
ID: 1414965
Thank you to Chensu for the answer.  Indeed the control in question  is a mixer-type control under the "Wave Recording" destination line.

After using the suggested mixerapp sample I also found a set of mixer classes at www.codeguru.com.  They are primarily for making controls for the mixer, but they do give great insight into how the mixer is organized.

Carlos
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Standards for file storage. 3 25
DB Mail Export to Excel some row wrap to new row 30 115
Problem to file 3 74
VIDEO DATASOURCE Control Resize issue 2 15
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 article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
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…

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

17 Experts available now in Live!

Get 1:1 Help Now