Changeset 2456 for trunk/src/winmm/mciwave/mciwave.cpp
- Timestamp:
- Jan 15, 2000, 11:02:50 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/winmm/mciwave/mciwave.cpp
r2308 r2456 31 31 LPWAVEFORMATEX lpWaveFormat; 32 32 BOOL fInput; /* FALSE = Output, TRUE = Input */ 33 WORDdwStatus; /* one from MCI_MODE_xxxx */33 volatile WORD dwStatus; /* one from MCI_MODE_xxxx */ 34 34 DWORD dwMciTimeFormat;/* One of the supported MCI_FORMAT_xxxx */ 35 35 DWORD dwFileOffset; /* Offset of chunk in mmio file */ … … 38 38 HANDLE hEvent; /* for synchronization */ 39 39 DWORD dwEventCount; /* for synchronization */ 40 } WINE_MCIWAVE , *PWINE_MCIWAVE;40 } WINE_MCIWAVE; 41 41 42 42 /* =================================================================== … … 128 128 static DWORD WAVE_drvOpen(LPSTR str, LPMCI_OPEN_DRIVER_PARMSA modp) 129 129 { 130 WINE_MCIWAVE* wmw = PWINE_MCIWAVE(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_MCIWAVE)));130 WINE_MCIWAVE* wmw = (WINE_MCIWAVE*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_MCIWAVE)); 131 131 132 132 if (!wmw) … … 435 435 dwRet = (wmw->fInput) ? waveInReset(wmw->hWave) : waveOutReset(wmw->hWave); 436 436 } 437 while ( ((volatile WINE_MCIWAVE*)wmw)->dwStatus != MCI_MODE_STOP)437 while (wmw->dwStatus != MCI_MODE_STOP) 438 438 Sleep(10); 439 439 break; … … 553 553 } 554 554 555 if (wmw->dwStatus == MCI_MODE_PAUSE) { 556 /* FIXME: parameters (start/end) in lpParams may not be used */ 557 return WAVE_mciResume(wDevID, dwFlags, (LPMCI_GENERIC_PARMS)lpParms); 558 } 559 560 /** This function will be called again by a thread when async is used. 561 * We have to set MCI_MODE_PLAY before we do this so that the app can spin 562 * on MCI_STATUS, so we have to allow it here if we're not going to start this thread. 563 */ 564 if ((wmw->dwStatus != MCI_MODE_STOP) && ((wmw->dwStatus != MCI_MODE_PLAY) && (dwFlags & MCI_WAIT))) { 565 return MCIERR_INTERNAL; 566 } 567 568 wmw->dwStatus = MCI_MODE_PLAY; 569 555 570 if (!(dwFlags & MCI_WAIT)) { 556 571 return MCI_SendCommandAsync(wmw->wNotifyDeviceID, MCI_PLAY, dwFlags, 557 572 (DWORD)lpParms, sizeof(MCI_PLAY_PARMS)); 558 }559 560 if (wmw->dwStatus != MCI_MODE_STOP) {561 if (wmw->dwStatus == MCI_MODE_PAUSE) {562 /* FIXME: parameters (start/end) in lpParams may not be used */563 return WAVE_mciResume(wDevID, dwFlags, (LPMCI_GENERIC_PARMS)lpParms);564 }565 return MCIERR_INTERNAL;566 573 } 567 574 … … 628 635 629 636 TRACE("Playing (normalized) from byte=%lu for %lu bytes\n", wmw->dwPosition, left); 630 wmw->dwStatus = MCI_MODE_PLAY;631 637 632 638 /* FIXME: this doesn't work if wmw->dwPosition != 0 */ … … 719 725 } 720 726 bufsize = 64000; 721 waveHdr.lpData = ( CHAR*)HeapAlloc(GetProcessHeap(), 0, bufsize);727 waveHdr.lpData = (char*)HeapAlloc(GetProcessHeap(), 0, bufsize); 722 728 waveHdr.dwBufferLength = bufsize; 723 729 waveHdr.dwUser = 0L;
Note:
See TracChangeset
for help on using the changeset viewer.