Changeset 9012 for trunk/src


Ignore:
Timestamp:
Aug 16, 2002, 12:09:49 PM (23 years ago)
Author:
sandervl
Message:

put back resume code

File:
1 edited

Legend:

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

    r9004 r9012  
    1 /* $Id: waveoutdart.cpp,v 1.14 2002-08-14 19:02:10 sandervl Exp $ */
     1/* $Id: waveoutdart.cpp,v 1.15 2002-08-16 10:09:49 sandervl Exp $ */
    22
    33/*
     
    368368    wmutex.leave();
    369369
    370     // Resume playback.
    371     mymciSendCommand(DeviceId, MCI_RESUME, MCI_WAIT, (PVOID)&Params, 0);
    372 
     370    //Only write buffers to dart if mixer has been initialized; if not, then
     371    //the first buffer write will do this for us.
     372    if(fMixerSetup == TRUE)
     373    {
     374        wmutex.enter();
     375        State     = STATE_PLAYING;
     376        fUnderrun = FALSE;
     377        curbuf = curPlayBuf;
     378        writeBuffer();  //must be called before (re)starting playback
     379        wmutex.leave();
     380
     381        // MCI_MIXSETUP_PARMS->pMixWrite does alter FS: selector!
     382        USHORT selTIB = GetFS(); // save current FS selector
     383
     384        for(i=0;i<PREFILLBUF_DART;i++)
     385        {
     386            dprintf(("restart: write buffer at %x size %d", MixBuffer[curbuf].pBuffer, MixBuffer[curbuf].ulBufferLength));
     387            MixSetupParms->pmixWrite(MixSetupParms->ulMixHandle, &MixBuffer[curbuf], 1);
     388            if(++curbuf == PREFILLBUF_DART)
     389                curbuf = 0;
     390        }
     391        SetFS(selTIB);           // switch back to the saved FS selector
     392    }
    373393    return(MMSYSERR_NOERROR);
    374394}
Note: See TracChangeset for help on using the changeset viewer.