// JP opened flex table

Click to See Complete Forum and Search --> : mixerSetControlDetails() function does not change the volume of the microphone


zony
April 18th, 2007, 10:41 AM
It seems like the mixerSetControlDetails() function is not able to change the volume of the microphone. I am using the following code:

MMRESULT err;
HMIXER mixerHandle;

err = mixerOpen(&mixerHandle, 0, 0, 0, 0);
MIXERCONTROLDETAILS_UNSIGNED value;
MIXERCONTROLDETAILS mixerControlDetails;

mixerControlDetails.cbStruct = sizeof(MIXERCONTROLDETAILS);
// I am absolutely sure that this is the right ID
mixerControlDetails.dwControlID = 0x00000021;
mixerControlDetails.cChannels = 1;
mixerControlDetails.cMultipleItems = 0;
mixerControlDetails.paDetails = &value;
mixerControlDetails.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED);

value.dwValue = 0x00000000;

mixerSetControlDetails((HMIXEROBJ)mixerHandle, &mixerControlDetails, MIXER_SETCONTROLDETAILSF_VALUE)));

This snippet works for any other source line but not for the microphone. E.g. if I change the ID to 0x20 the "Line in" volume changes. I am sure the ID for the microphone is correct (I found it using mixerGetLineControls()). The function does not throw an error, just nothing happens.

Any ideas?

//JP added flex table