Changeset 19126
- Timestamp:
- Jun 5, 2002, 1:44:11 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/src/winmm/waveoutdart.cpp ¶
r19122 r19126 1 /* $Id: waveoutdart.cpp,v 1. 9 2002-06-05 09:19:30sandervl Exp $ */1 /* $Id: waveoutdart.cpp,v 1.10 2002-06-05 11:44:11 sandervl Exp $ */ 2 2 3 3 /* … … 337 337 { 338 338 MCI_GENERIC_PARMS Params; 339 int i, curbuf; 339 340 340 341 dprintf(("DartWaveOut::resume")); … … 345 346 return(MMSYSERR_NOERROR); 346 347 } 347 348 State = STATE_PLAYING;349 348 wmutex.leave(); 350 349 351 memset(&Params, 0, sizeof(Params)); 352 353 // Resume the playback. 354 mymciSendCommand(DeviceId, MCI_RESUME, MCI_WAIT, (PVOID)&Params, 0); 350 //Only write buffers to dart if mixer has been initialized; if not, then 351 //the first buffer write will do this for us. 352 if(fMixerSetup == TRUE) 353 { 354 wmutex.enter(); 355 State = STATE_PLAYING; 356 fUnderrun = FALSE; 357 wmutex.leave(); 358 curbuf = curPlayBuf; 359 360 // MCI_MIXSETUP_PARMS->pMixWrite does alter FS: selector! 361 USHORT selTIB = GetFS(); // save current FS selector 362 363 for(i=0;i<PREFILLBUF_DART;i++) 364 { 365 dprintf(("restart: write buffer at %x size %d", MixBuffer[curbuf].pBuffer, MixBuffer[curbuf].ulBufferLength)); 366 MixSetupParms->pmixWrite(MixSetupParms->ulMixHandle, &MixBuffer[curbuf], 1); 367 if(++curbuf == PREFILLBUF_DART) 368 curbuf = 0; 369 } 370 SetFS(selTIB); // switch back to the saved FS selector 371 } 355 372 356 373 return(MMSYSERR_NOERROR); … … 360 377 MMRESULT DartWaveOut::stop() 361 378 { 362 MCI_GENERIC_PARMS Params;379 MCI_GENERIC_PARMS Params; 363 380 364 381 dprintf(("DartWaveOut::stop %s", (State == STATE_PLAYING) ? "playing" : "stopped")); … … 383 400 MMRESULT DartWaveOut::reset() 384 401 { 385 MCI_GENERIC_PARMS Params;386 LPWAVEHDR tmpwavehdr;402 MCI_GENERIC_PARMS Params; 403 LPWAVEHDR tmpwavehdr; 387 404 388 405 dprintf(("DartWaveOut::reset %s", (State == STATE_PLAYING) ? "playing" : "stopped"));
Note:
See TracChangeset
for help on using the changeset viewer.