Author: akhaldi
Date: Sat May 19 11:34:35 2012
New Revision: 56620
URL:
http://svn.reactos.org/svn/reactos?rev=56620&view=rev
Log:
[MCIWAVE]
* Sync to Wine 1.5.4.
Modified:
trunk/reactos/dll/win32/mciwave/mciwave.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/mciwave/mciwave.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciwave/mciwave.…
==============================================================================
--- trunk/reactos/dll/win32/mciwave/mciwave.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mciwave/mciwave.c [iso-8859-1] Sat May 19 11:34:35 2012
@@ -225,7 +225,7 @@
/**************************************************************************
* WAVE_ConvertByteToTimeFormat [internal]
*/
-static DWORD WAVE_ConvertByteToTimeFormat(WINE_MCIWAVE* wmw, DWORD val, LPDWORD lpRet)
+static DWORD WAVE_ConvertByteToTimeFormat(WINE_MCIWAVE* wmw, DWORD val)
{
DWORD ret = 0;
@@ -243,7 +243,6 @@
WARN("Bad time format %u!\n", wmw->dwMciTimeFormat);
}
TRACE("val=%u=0x%08x [tf=%u] => ret=%u\n", val, val,
wmw->dwMciTimeFormat, ret);
- *lpRet = 0;
return ret;
}
@@ -257,6 +256,9 @@
switch (wmw->dwMciTimeFormat) {
case MCI_FORMAT_MILLISECONDS:
ret = MulDiv(val,wmw->lpWaveFormat->nAvgBytesPerSec,1000);
+ if (ret > wmw->ckWaveData.cksize &&
+ val == WAVE_ConvertByteToTimeFormat(wmw, wmw->ckWaveData.cksize))
+ ret = wmw->ckWaveData.cksize;
break;
case MCI_FORMAT_BYTES:
ret = val;
@@ -868,6 +870,10 @@
whidx = 0;
wmw->hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
+ if (!wmw->hEvent) {
+ dwRet = MCIERR_OUT_OF_MEMORY;
+ goto cleanUp;
+ }
wmw->dwEventCount = 1L; /* for first buffer */
TRACE("Playing (normalized) from byte=%u for %u bytes\n",
wmw->dwPosition, left);
@@ -919,6 +925,7 @@
wmw->hWave = 0;
}
CloseHandle(wmw->hEvent);
+ wmw->hEvent = NULL;
wmw->dwStatus = MCI_MODE_STOP;
@@ -1484,7 +1491,7 @@
return MCIERR_UNSUPPORTED_FUNCTION;
}
/* only one track in file is currently handled, so don't take care of MCI_TRACK
flag */
- lpParms->dwReturn = WAVE_ConvertByteToTimeFormat(wmw, wmw->ckWaveData.cksize,
&ret);
+ lpParms->dwReturn = WAVE_ConvertByteToTimeFormat(wmw,
wmw->ckWaveData.cksize);
TRACE("MCI_STATUS_LENGTH => %lu\n", lpParms->dwReturn);
break;
case MCI_STATUS_MODE:
@@ -1509,8 +1516,7 @@
}
/* only one track in file is currently handled, so don't take care of MCI_TRACK
flag */
lpParms->dwReturn = WAVE_ConvertByteToTimeFormat(wmw,
- (dwFlags & MCI_STATUS_START) ? 0 : wmw->dwPosition,
- &ret);
+ (dwFlags & MCI_STATUS_START) ? 0 : wmw->dwPosition);
TRACE("MCI_STATUS_POSITION %s => %lu\n",
(dwFlags & MCI_STATUS_START) ? "start" : "current",
lpParms->dwReturn);
break;
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat May 19 11:34:35 2012
@@ -87,7 +87,7 @@
reactos/dll/win32/mcicda # Synced to Wine-1.3.37
reactos/dll/win32/mciqtz32 # Synced to Wine-1.5.4
reactos/dll/win32/mciseq # Synced to Wine-1.3.37
-reactos/dll/win32/mciwave # Synced to Wine-1.3.37
+reactos/dll/win32/mciwave # Synced to Wine-1.5.4
reactos/dll/win32/mlang # Synced to Wine-1.3.37
reactos/dll/win32/mpr # Autosync
reactos/dll/win32/mprapi # Synced to Wine-1.3.37