HMIXER mixer; MIXERCAPS mixercaps; MIXERLINE mixerline; MIXERLINECONTROLS mix_line_ctrl; MIXERCONTROLDETAILS WOVolDet; MIXERCONTROLDETAILS_BOOLEAN mixer_ctrl_bool; int MixerCount; int Res; QString MixerStrTypes[20] = { "MIXERLINE_COMPONENTTYPE_DST_DIGITAL", "MIXERLINE_COMPONENTTYPE_DST_HEADPHONES", "MIXERLINE_COMPONENTTYPE_DST_LINE", "MIXERLINE_COMPONENTTYPE_DST_MONITOR", "MIXERLINE_COMPONENTTYPE_DST_SPEAKERS", "MIXERLINE_COMPONENTTYPE_DST_TELEPHONE", "MIXERLINE_COMPONENTTYPE_DST_UNDEFINED", "MIXERLINE_COMPONENTTYPE_DST_VOICEIN", "MIXERLINE_COMPONENTTYPE_DST_WAVEIN", "MIXERLINE_COMPONENTTYPE_SRC_ANALOG", "MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY", "MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC", "MIXERLINE_COMPONENTTYPE_SRC_DIGITAL", "MIXERLINE_COMPONENTTYPE_SRC_LINE", "MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE", "MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER", "MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER", "MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE", "MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED", "MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT", }; MixerCount = mixerGetNumDevs(); QString ttt,jjj,kkk; if (!MixerCount) { ttt="No mixers is system"; ui.textEdit->setText(ttt); return; } ttt="Mixers count = " + jjj.setNum(MixerCount)+"\n"; ui.textEdit->setText(ttt); for (int m = 0; m < MixerCount; m++) { Res = mixerOpen(&mixer, m, 0, 0, 0); if (Res == MMSYSERR_NOERROR) { ttt+= "Mixer #" + jjj.setNum(m); Res = mixerGetDevCaps((UINT) mixer, &mixercaps, sizeof(MIXERCAPS)); if (Res == MMSYSERR_NOERROR) {//вывод информации для удобства kkk=""; for(int y=0;y<MIXER_LONG_NAME_CHARS,mixercaps.szPname[y]!='\0';y++) kkk+=mixercaps.szPname[y]; ttt += ", Device = " + kkk+"\n"; } ui.textEdit->setText(" "); mixerline.cbStruct = sizeof(mixerline); mixerline.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_WAVEIN; Res = mixerGetLineInfo((HMIXEROBJ)mixer, &mixerline, MIXER_GETLINEINFOF_COMPONENTTYPE); if (Res == MMSYSERR_NOERROR) { jjj="MIXERLINE_COMPONENTTYPE_DST_WAVEIN"; kkk=""; for(int y=0;y<MIXER_LONG_NAME_CHARS;y++) kkk+=mixerline.szName[y]; ttt+="*****MIXER_GETLINEINFOF_COMPONENTTYPE/ " + jjj+ "*****" +"\n"; mix_line_ctrl.dwControlType=MIXERCONTROL_CONTROLTYPE_MIXER/*MIXERCONTROL_CONTROLTYPE_BOOLEAN*/; mix_line_ctrl.cControls=1; mix_line_ctrl.dwLineID=mixerline.dwLineID; mix_line_ctrl.cbStruct=sizeof(mix_line_ctrl); Res = mixerGetLineControls ((HMIXEROBJ)mixer,&mix_line_ctrl,MIXER_GETLINECONTROLSF_ONEBYTYPE); mixer_ctrl_bool.fValue=true; WOVolDet.cbStruct=sizeof(WOVolDet); WOVolDet.dwControlID=mix_line_ctrl.dwControlID; WOVolDet.cChannels=1; WOVolDet.cbDetails=sizeof(MIXERCONTROLDETAILS_BOOLEAN); //WOVolDet.paDetails=sizeof(MIXERCONTROLDETAILS_BOOLEAN)*1; WOVolDet.cMultipleItems=0; // mixerSetControlDetails ((HMIXEROBJ)mixer,&WOVolDet,MIXER_GETCONTROLDETAILSF_VALUE); // - не уверена что функция правильно заполнена (mixerSetControlDetails) //mixerMessage ((HMIXEROBJ)mixer, UINT Msg, DWORD P1, DWORD P2); - что надо писать в //UINT Msg, DWORD P1, DWORD P2 не понятно }