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?
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?