Ignore:
Timestamp:
May 29, 2002, 5:13:05 PM (23 years ago)
Author:
sandervl
Message:

mixerGetLineInfoW & mixerGetLineControlsA fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/winmm/mixer.cpp

    r8508 r8517  
    1 /* $Id: mixer.cpp,v 1.22 2002-05-28 14:09:24 sandervl Exp $ */
     1/* $Id: mixer.cpp,v 1.23 2002-05-29 15:13:05 sandervl Exp $ */
    22
    33/*
     
    717717        }
    718718        pLine = &pmixerLines[lpMlc->dwLineID]->line;
    719         if(lpMlc->cControls != pLine->cControls || lpMlc->cbmxctrl < pLine->cControls*sizeof(MIXERCONTROLA)) {
     719        if(lpMlc->cControls != pLine->cControls) {
    720720            dprintf(("ERROR: invalid nr of controls %d or structure size %d (%d) (ptr %x)", lpMlc->cControls, lpMlc->cbmxctrl, pLine->cControls*sizeof(MIXERCONTROLA), lpMlc->pamxctrl));
    721721            return MMSYSERR_INVALPARAM;
     
    723723        for(int i=0;i<lpMlc->cControls;i++) {
    724724            pCtrl = lpMlc->pamxctrl+i;
    725             memcpy(pCtrl, &pmixerLines[lpMlc->dwLineID]->Controls[i], sizeof(MIXERCONTROLA));
     725            memcpy(pCtrl, &mixerControls[pmixerLines[lpMlc->dwLineID]->Controls[i]], sizeof(MIXERCONTROLA));
    726726            dprintf(("found control %s (%s) control id %d", pCtrl->szName, pCtrl->szShortName, pCtrl->dwControlID));
    727727        }
     
    11541154    line.cChannels             = pmxl->cChannels;
    11551155    line.cConnections          = pmxl->cConnections;
     1156    line.cControls             = pmxl->cControls;
    11561157    line.dwComponentType       = pmxl->dwComponentType;
    11571158    line.dwDestination         = pmxl->dwDestination;
     
    11771178    pmxl->cChannels             = line.cChannels;
    11781179    pmxl->cConnections          = line.cConnections;
     1180    pmxl->cControls             = line.cControls;
    11791181    pmxl->dwComponentType       = line.dwComponentType;
    11801182    pmxl->dwDestination         = line.dwDestination;
     
    18401842    //add control to list of controls associated with source line
    18411843    pSrcLine->Controls[pSrcLine->cControls] = pctrl->dwControlID;
     1844    pSrcLine->line.cControls++;
    18421845    pSrcLine->cControls++;
    18431846
Note: See TracChangeset for help on using the changeset viewer.