Ignore:
Timestamp:
Jun 4, 2002, 7:36:56 PM (23 years ago)
Author:
sandervl
Message:

Updates for wave playback

File:
1 edited

Legend:

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

    r8202 r8568  
    1 /* $Id: waveoutdaud.cpp,v 1.7 2002-04-07 14:36:32 sandervl Exp $ */
     1/* $Id: waveoutdaud.cpp,v 1.8 2002-06-04 17:36:56 sandervl Exp $ */
    22
    33/*
     
    160160    }
    161161
    162     if(State == STATE_STOPPED) {//continue playback
    163         restart();
    164     }
    165     else
    166     if(fUnderrun) {
    167         dprintf(("Resume playback after underrun"));
     162    if(State == STATE_STOPPED || fUnderrun) {
     163        wmutex.enter();
     164        State     = STATE_PLAYING;
    168165        fUnderrun = FALSE;
    169         State = STATE_PLAYING;
    170 
    171         // Resume the playback.
    172         resume();
     166        wmutex.leave();
     167
     168        if(sendIOCTL(DAUDIO_START, &cmd)) {
     169            dprintf(("Unable to (re)start stream!!!!!"));
     170            return MMSYSERR_ERROR;
     171        }
    173172    }
    174173    return(MMSYSERR_NOERROR);
     
    266265/******************************************************************************/
    267266/******************************************************************************/
    268 MMRESULT DAudioWaveOut::restart()
    269 {
    270     DAUDIO_CMD cmd;
    271 
    272     dprintf(("DAudioWaveOut::restart"));
    273     if(State == STATE_PLAYING)
    274         return(MMSYSERR_NOERROR);
    275 
    276     wmutex.enter();
    277     State     = STATE_PLAYING;
    278     fUnderrun = FALSE;
    279     wmutex.leave();
    280 
    281     return sendIOCTL(DAUDIO_START, &cmd);
    282 }
    283 /******************************************************************************/
    284 /******************************************************************************/
    285267ULONG DAudioWaveOut::getPosition()
    286268{
Note: See TracChangeset for help on using the changeset viewer.