Link to home
Start Free TrialLog in
Avatar of carlosn
carlosn

asked on

Multemedia mixer question

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?
Avatar of Madshi
Madshi

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.
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of carlosn

ASKER

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