Changeset 8955 for trunk/src


Ignore:
Timestamp:
Aug 1, 2002, 6:06:43 PM (23 years ago)
Author:
sandervl
Message:

keep filling DART buffers until no room left (::write & ::resume)

File:
1 edited

Legend:

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

    r8947 r8955  
    1 /* $Id: waveoutdart.cpp,v 1.11 2002-07-31 13:51:21 sandervl Exp $ */
     1/* $Id: waveoutdart.cpp,v 1.12 2002-08-01 16:06:43 sandervl Exp $ */
    22
    33/*
     
    301301
    302302        if(!fUnderrun && State != STATE_STOPPED) {//don't start playback if paused
     303            //write new data to the DART buffers (if there's any room left)
     304            if(State == STATE_PLAYING) {
     305                writeBuffer();  //must be called before (re)starting playback
     306            }
    303307            wmutex.leave();
    304308            return(MMSYSERR_NOERROR);
    305309        }
    306 
    307310        writeBuffer();  //must be called before (re)starting playback
    308 
    309311        State     = STATE_PLAYING;
    310312        fUnderrun = FALSE;
     
    372374        State     = STATE_PLAYING;
    373375        fUnderrun = FALSE;
     376        curbuf = curPlayBuf;
     377        writeBuffer();  //must be called before (re)starting playback
    374378        wmutex.leave();
    375         curbuf = curPlayBuf;
    376379
    377380        // MCI_MIXSETUP_PARMS->pMixWrite does alter FS: selector!
     
    417420MMRESULT DartWaveOut::reset()
    418421{
    419      MCI_GENERIC_PARMS Params;
     422    MCI_GENERIC_PARMS Params;
    420423    LPWAVEHDR tmpwavehdr;
    421424
     
    425428
    426429    memset(&Params, 0, sizeof(Params));
     430
     431    wmutex.enter();
     432    State     = STATE_STOPPED;
     433    wmutex.leave();
    427434
    428435    // Stop the playback.
     
    444451    }
    445452    wavehdr   = NULL;
    446     State     = STATE_STOPPED;
    447453    fUnderrun = FALSE;
    448454
Note: See TracChangeset for help on using the changeset viewer.