Removed duplicate field in internal structure.
Silenced warning for MCI_CONFIGURE message.
This commit is contained in:
parent
8bdba1ba6c
commit
0478059b46
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* Copyright 1994 Martin Ayotte
|
* Copyright 1994 Martin Ayotte
|
||||||
* 1999 Eric Pouech
|
* 1999 Eric Pouech
|
||||||
* 2000 Francois Jacques
|
* 2000 Francois Jacques
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
#include "wingdi.h"
|
#include "wingdi.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "mmddk.h"
|
#include "mmddk.h"
|
||||||
|
#include "digitalv.h"
|
||||||
#include "heap.h"
|
#include "heap.h"
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
|
|
||||||
|
@ -23,20 +24,19 @@ typedef struct {
|
||||||
HANDLE hWave;
|
HANDLE hWave;
|
||||||
int nUseCount; /* Incremented for each shared open */
|
int nUseCount; /* Incremented for each shared open */
|
||||||
BOOL fShareable; /* TRUE if first open was shareable */
|
BOOL fShareable; /* TRUE if first open was shareable */
|
||||||
WORD wNotifyDeviceID;/* MCI device ID with a pending notification */
|
|
||||||
HMMIO hFile; /* mmio file handle open as Element */
|
HMMIO hFile; /* mmio file handle open as Element */
|
||||||
MCI_WAVE_OPEN_PARMSA openParms;
|
MCI_WAVE_OPEN_PARMSA openParms;
|
||||||
LPWAVEFORMATEX lpWaveFormat;
|
LPWAVEFORMATEX lpWaveFormat;
|
||||||
BOOL fInput; /* FALSE = Output, TRUE = Input */
|
BOOL fInput; /* FALSE = Output, TRUE = Input */
|
||||||
volatile WORD dwStatus; /* one from MCI_MODE_xxxx */
|
volatile WORD dwStatus; /* one from MCI_MODE_xxxx */
|
||||||
DWORD dwMciTimeFormat;/* One of the supported MCI_FORMAT_xxxx */
|
DWORD dwMciTimeFormat;/* One of the supported MCI_FORMAT_xxxx */
|
||||||
DWORD dwRemaining; /* remaining bytes to play or record */
|
DWORD dwRemaining; /* remaining bytes to play or record */
|
||||||
DWORD dwPosition; /* position in bytes in chunk */
|
DWORD dwPosition; /* position in bytes in chunk */
|
||||||
HANDLE hEvent; /* for synchronization */
|
HANDLE hEvent; /* for synchronization */
|
||||||
DWORD dwEventCount; /* for synchronization */
|
DWORD dwEventCount; /* for synchronization */
|
||||||
BOOL bTemporaryFile; /* temporary file (MCI_RECORD) */
|
BOOL bTemporaryFile; /* temporary file (MCI_RECORD) */
|
||||||
MMCKINFO ckMainRIFF; /* main RIFF chunk */
|
MMCKINFO ckMainRIFF; /* main RIFF chunk */
|
||||||
MMCKINFO ckWaveData; /* data chunk */
|
MMCKINFO ckWaveData; /* data chunk */
|
||||||
} WINE_MCIWAVE;
|
} WINE_MCIWAVE;
|
||||||
|
|
||||||
/* ===================================================================
|
/* ===================================================================
|
||||||
|
@ -330,7 +330,6 @@ err:
|
||||||
static DWORD WAVE_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_PARMSA lpOpenParms)
|
static DWORD WAVE_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_PARMSA lpOpenParms)
|
||||||
{
|
{
|
||||||
DWORD dwRet = 0;
|
DWORD dwRet = 0;
|
||||||
DWORD dwDeviceID;
|
|
||||||
WINE_MCIWAVE* wmw = (WINE_MCIWAVE*)mciGetDriverData(wDevID);
|
WINE_MCIWAVE* wmw = (WINE_MCIWAVE*)mciGetDriverData(wDevID);
|
||||||
CHAR* pszTmpFileName = 0;
|
CHAR* pszTmpFileName = 0;
|
||||||
|
|
||||||
|
@ -350,13 +349,11 @@ static DWORD WAVE_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_PARMSA lpO
|
||||||
|
|
||||||
wmw->nUseCount++;
|
wmw->nUseCount++;
|
||||||
|
|
||||||
dwDeviceID = lpOpenParms->wDeviceID;
|
|
||||||
|
|
||||||
wmw->fInput = FALSE;
|
wmw->fInput = FALSE;
|
||||||
wmw->hWave = 0;
|
wmw->hWave = 0;
|
||||||
wmw->dwStatus = MCI_MODE_NOT_READY;
|
wmw->dwStatus = MCI_MODE_NOT_READY;
|
||||||
|
|
||||||
TRACE("wDevID=%04X (lpParams->wDeviceID=%08lX)\n", wDevID, dwDeviceID);
|
TRACE("wDevID=%04X (lpParams->wDeviceID=%08X)\n", wDevID, lpOpenParms->wDeviceID);
|
||||||
|
|
||||||
if (dwFlags & MCI_OPEN_ELEMENT) {
|
if (dwFlags & MCI_OPEN_ELEMENT) {
|
||||||
if (dwFlags & MCI_OPEN_ELEMENT_ID) {
|
if (dwFlags & MCI_OPEN_ELEMENT_ID) {
|
||||||
|
@ -458,8 +455,6 @@ static DWORD WAVE_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_PARMSA lpO
|
||||||
wmw->openParms.lpstrElementName = pszTmpFileName;
|
wmw->openParms.lpstrElementName = pszTmpFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
wmw->wNotifyDeviceID = dwDeviceID;
|
|
||||||
|
|
||||||
if (dwRet == 0) {
|
if (dwRet == 0) {
|
||||||
if (wmw->lpWaveFormat) {
|
if (wmw->lpWaveFormat) {
|
||||||
switch (wmw->lpWaveFormat->wFormatTag) {
|
switch (wmw->lpWaveFormat->wFormatTag) {
|
||||||
|
@ -568,7 +563,7 @@ static DWORD WAVE_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParm
|
||||||
|
|
||||||
if ((dwFlags & MCI_NOTIFY) && lpParms) {
|
if ((dwFlags & MCI_NOTIFY) && lpParms) {
|
||||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||||
wmw->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
wmw->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return dwRet;
|
return dwRet;
|
||||||
|
@ -614,7 +609,7 @@ static DWORD WAVE_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPar
|
||||||
|
|
||||||
if ((dwFlags & MCI_NOTIFY) && lpParms) {
|
if ((dwFlags & MCI_NOTIFY) && lpParms) {
|
||||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||||
wmw->wNotifyDeviceID,
|
wmw->openParms.wDeviceID,
|
||||||
(dwRet == 0) ? MCI_NOTIFY_SUCCESSFUL : MCI_NOTIFY_FAILURE);
|
(dwRet == 0) ? MCI_NOTIFY_SUCCESSFUL : MCI_NOTIFY_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -705,7 +700,7 @@ static DWORD WAVE_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||||
wmw->dwStatus = MCI_MODE_PLAY;
|
wmw->dwStatus = MCI_MODE_PLAY;
|
||||||
|
|
||||||
if (!(dwFlags & MCI_WAIT)) {
|
if (!(dwFlags & MCI_WAIT)) {
|
||||||
return MCI_SendCommandAsync(wmw->wNotifyDeviceID, MCI_PLAY, dwFlags,
|
return MCI_SendCommandAsync(wmw->openParms.wDeviceID, MCI_PLAY, dwFlags,
|
||||||
(DWORD)lpParms, sizeof(MCI_PLAY_PARMS));
|
(DWORD)lpParms, sizeof(MCI_PLAY_PARMS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -841,7 +836,7 @@ cleanUp:
|
||||||
|
|
||||||
if (lpParms && (dwFlags & MCI_NOTIFY)) {
|
if (lpParms && (dwFlags & MCI_NOTIFY)) {
|
||||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||||
wmw->wNotifyDeviceID,
|
wmw->openParms.wDeviceID,
|
||||||
dwRet ? MCI_NOTIFY_FAILURE : MCI_NOTIFY_SUCCESSFUL);
|
dwRet ? MCI_NOTIFY_FAILURE : MCI_NOTIFY_SUCCESSFUL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -941,7 +936,7 @@ static DWORD WAVE_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpPar
|
||||||
wmw->dwStatus = MCI_MODE_RECORD;
|
wmw->dwStatus = MCI_MODE_RECORD;
|
||||||
|
|
||||||
if (!(dwFlags & MCI_WAIT)) {
|
if (!(dwFlags & MCI_WAIT)) {
|
||||||
return MCI_SendCommandAsync(wmw->wNotifyDeviceID, MCI_RECORD, dwFlags,
|
return MCI_SendCommandAsync(wmw->openParms.wDeviceID, MCI_RECORD, dwFlags,
|
||||||
(DWORD)lpParms, sizeof(MCI_RECORD_PARMS));
|
(DWORD)lpParms, sizeof(MCI_RECORD_PARMS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1048,7 +1043,7 @@ cleanUp:
|
||||||
|
|
||||||
if (lpParms && (dwFlags & MCI_NOTIFY)) {
|
if (lpParms && (dwFlags & MCI_NOTIFY)) {
|
||||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||||
wmw->wNotifyDeviceID,
|
wmw->openParms.wDeviceID,
|
||||||
dwRet ? MCI_NOTIFY_FAILURE : MCI_NOTIFY_SUCCESSFUL);
|
dwRet ? MCI_NOTIFY_FAILURE : MCI_NOTIFY_SUCCESSFUL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1134,7 +1129,7 @@ static DWORD WAVE_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
||||||
|
|
||||||
if (dwFlags & MCI_NOTIFY) {
|
if (dwFlags & MCI_NOTIFY) {
|
||||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||||
wmw->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
wmw->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1255,8 +1250,7 @@ static DWORD WAVE_mciSave(UINT wDevID, DWORD dwFlags, LPMCI_SAVE_PARMS lpParms)
|
||||||
if (ret == ERROR_SUCCESS) wparam = MCI_NOTIFY_SUCCESSFUL;
|
if (ret == ERROR_SUCCESS) wparam = MCI_NOTIFY_SUCCESSFUL;
|
||||||
|
|
||||||
mciDriverNotify( (HWND) LOWORD(lpParms->dwCallback),
|
mciDriverNotify( (HWND) LOWORD(lpParms->dwCallback),
|
||||||
wmw->wNotifyDeviceID,
|
wmw->openParms.wDeviceID, wparam);
|
||||||
wparam);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1403,7 +1397,7 @@ static DWORD WAVE_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar
|
||||||
}
|
}
|
||||||
if (dwFlags & MCI_NOTIFY) {
|
if (dwFlags & MCI_NOTIFY) {
|
||||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||||
wmw->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
wmw->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1580,6 +1574,9 @@ LONG CALLBACK MCIWAVE_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
|
||||||
case MCI_WINDOW:
|
case MCI_WINDOW:
|
||||||
TRACE("Unsupported command [%lu]\n", wMsg);
|
TRACE("Unsupported command [%lu]\n", wMsg);
|
||||||
break;
|
break;
|
||||||
|
/* option which can be silenced */
|
||||||
|
case MCI_CONFIGURE:
|
||||||
|
return 0;
|
||||||
case MCI_OPEN:
|
case MCI_OPEN:
|
||||||
case MCI_CLOSE:
|
case MCI_CLOSE:
|
||||||
ERR("Shouldn't receive a MCI_OPEN or CLOSE message\n");
|
ERR("Shouldn't receive a MCI_OPEN or CLOSE message\n");
|
||||||
|
|
Loading…
Reference in New Issue