Posts: 1,000
Threads: 253
Joined: Feb 2008
Anybody with any information for controlling windows audio mixer?
Examples:
Playback=>Audio Mixer=>Mute Line Out, Mute CD Player, and set Volume on Wave to a specific number.
Recording=>Select Stereo Mix+ Set Fader to certain value.
Thanks,
Jimmy Vig
Posts: 11,900
Threads: 138
Joined: Dec 2002
Can use Windows API mixer functions. It is difficult. Completely different on Vista and XP. See SetAudioVolume sample in first topic in Resources subforum.
Easier way - find a COM (ActiveX) component. But most are not free. Some may not work on Vista.
Posts: 1,000
Threads: 253
Joined: Feb 2008
Gint,
I was able to set using this in the SetAudioVolume function:
MIXERCONTROLDETAILS mxcd.cbStruct=sizeof(mxcd)
mxcd.dwControlID=18;;change around for right Mixer Slider or mute checkbox.
mxcd.cChannels=1
mxcd.cbDetails=sizeof(int)
mxcd.paDetails=&vi;;0 will unmute and 1 will mute checkbox
if(mixerSetControlDetails(0 &mxcd MIXER_OBJECTF_MIXER|MIXER_SETCONTROLDETAILSF_VALUE)) ret
It only lets you change options for the playback section on what ever sound card is set as the default device.
I now need to change options on the record section of the sound card! Any ideas how this can be done.
Thanks,
Jimmy Vig
Posts: 11,900
Threads: 138
Joined: Dec 2002
Try to find source code, for example in codeproject.com. If it is in C++, possible to convert to QM.
Posts: 1,000
Threads: 253
Joined: Feb 2008
This is exactly what I want. Full control over the Windows Mixer...
http://www.codeproject.com/KB/audio-video/AudioLib.aspx
but of course it is in C# and not C++...Do I really know the difference...No, but I do know that the dll that comes in the source code does not successfully load in QM. Do I know why...nope.
I'll keep looking for something in C++...and hopefully I'll get somewhere on this.
thanks,
jim