CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1

Threaded View

  1. #1
    Join Date
    Mar 2008
    Location
    Fortaleza - CE- Brazil
    Posts
    3

    Selecting Stereo Mix Record Line

    I'm trying to select Stereo Mix Record Line or Microphone Line without success. Making some modifications at this code, I can change the volume, but I couldn't select the active line.

    What am I doing wrong? Thanks in advance.


    mixerline.cbStruct = sizeof(MIXERLINE);
    mixerline.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_LINE;
    result = mixerGetLineInfo((HMIXEROBJ) mixerHandle, &mixerline, MIXER_GETLINEINFOF_COMPONENTTYPE);

    /*** GET ***/
    mixerLineControls.cbStruct = sizeof(MIXERLINECONTROLS);
    mixerLineControls.dwLineID = 1;
    mixerLineControls.dwControlType = MIXERCONTROL_CONTROLTYPE_SINGLESELECT;
    mixerLineControls.cControls = 1;
    mixerLineControls.pamxctrl = &mixerControl;
    mixerLineControls.cbmxctrl = sizeof(MIXERCONTROL);
    result = mixerGetLineControls((HMIXEROBJ) mixerHandle, &mixerLineControls, MIXER_GETLINECONTROLSF_ONEBYTYPE);


    /*** SET ***/
    mcdu.dwValue = TRUE;
    mcd.cbStruct = sizeof(MIXERCONTROLDETAILS);
    mcd.hwndOwner = 0;
    mcd.dwControlID = mixerControl.dwControlID;
    mcd.paDetails = &mcdu;
    mcd.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED);
    mcd.cChannels = 1;
    result = mixerSetControlDetails((HMIXEROBJ) mixerHandle, &mcd, MIXER_SETCONTROLDETAILSF_VALUE);
    Last edited by Thomas Couto; March 24th, 2008 at 08:39 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured