Updated to new MM header organization.
This commit is contained in:
parent
668228a1fa
commit
37c0217d03
|
@ -21,7 +21,8 @@
|
|||
#include <sys/ioctl.h>
|
||||
#include "wine/winuser16.h"
|
||||
#include "driver.h"
|
||||
#include "multimedia.h"
|
||||
#include "mmddk.h"
|
||||
#include "oss.h"
|
||||
#include "heap.h"
|
||||
#include "ldt.h"
|
||||
#include "debugtools.h"
|
||||
|
@ -1377,7 +1378,6 @@ DWORD WINAPI widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
|||
case WIDM_GETPOS: return widGetPosition(wDevID, (LPMMTIME16)dwParam1, dwParam2);
|
||||
case WIDM_RESET: return widReset(wDevID);
|
||||
case WIDM_START: return widStart(wDevID);
|
||||
case WIDM_PAUSE: return widStop(wDevID);
|
||||
case WIDM_STOP: return widStop(wDevID);
|
||||
default:
|
||||
FIXME("unknown message %u!\n", wMsg);
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
#include "dsound.h"
|
||||
#include "winuser.h"
|
||||
#include "winerror.h"
|
||||
#include "multimedia.h"
|
||||
#include "wine/obj_base.h"
|
||||
#include "thread.h"
|
||||
#include "debugtools.h"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "winuser.h"
|
||||
#include "heap.h"
|
||||
#include "driver.h"
|
||||
#include "multimedia.h"
|
||||
#include "winemm.h"
|
||||
#include "selectors.h"
|
||||
#include "digitalv.h"
|
||||
#include "options.h"
|
||||
|
@ -708,7 +708,7 @@ static DWORD MCI_HandleReturnValues(LPWINE_MM_IDATA iData, DWORD dwRet, LPWINE_M
|
|||
switch (dwRet & 0xFFFF0000ul) {
|
||||
case 0:
|
||||
case MCI_INTEGER_RETURNED:
|
||||
wsnprintfA(lpstrRet, uRetLen, "%d", data[1]);
|
||||
wsnprintfA(lpstrRet, uRetLen, "%ld", data[1]);
|
||||
break;
|
||||
case MCI_RESOURCE_RETURNED:
|
||||
/* return string which ID is HIWORD(data[1]),
|
||||
|
@ -741,7 +741,7 @@ static DWORD MCI_HandleReturnValues(LPWINE_MM_IDATA iData, DWORD dwRet, LPWINE_M
|
|||
break;
|
||||
case MCI_INTEGER_RETURNED:
|
||||
data[1] = *(LPDWORD)lpstrRet;
|
||||
wsnprintfA(lpstrRet, uRetLen, "%d", data[1]);
|
||||
wsnprintfA(lpstrRet, uRetLen, "%ld", data[1]);
|
||||
break;
|
||||
default:
|
||||
WARN("Oooch. MCI_STRING and HIWORD(dwRet)=%04x\n", HIWORD(dwRet));
|
||||
|
@ -751,7 +751,7 @@ static DWORD MCI_HandleReturnValues(LPWINE_MM_IDATA iData, DWORD dwRet, LPWINE_M
|
|||
case MCI_RECT:
|
||||
if (dwRet & 0xFFFF0000ul)
|
||||
WARN("Oooch. MCI_STRING and HIWORD(dwRet)=%04x\n", HIWORD(dwRet));
|
||||
wsnprintfA(lpstrRet, uRetLen, "%d %d %d %d",
|
||||
wsnprintfA(lpstrRet, uRetLen, "%ld %ld %ld %ld",
|
||||
data[1], data[2], data[3], data[4]);
|
||||
break;
|
||||
default: ERR("oops\n");
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "winuser.h"
|
||||
#include "driver.h"
|
||||
#include "multimedia.h"
|
||||
#include "mmddk.h"
|
||||
#include "debugtools.h"
|
||||
|
||||
DEFAULT_DEBUG_CHANNEL(mcianim)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <string.h>
|
||||
#include "winuser.h"
|
||||
#include "multimedia.h"
|
||||
#include "mmddk.h"
|
||||
#include "user.h"
|
||||
#include "driver.h"
|
||||
#include "digitalv.h"
|
||||
|
|
|
@ -8,19 +8,18 @@
|
|||
|
||||
#include "winuser.h"
|
||||
#include "driver.h"
|
||||
#include "multimedia.h"
|
||||
#include "mmddk.h"
|
||||
#include "cdrom.h"
|
||||
#include "debugtools.h"
|
||||
|
||||
DEFAULT_DEBUG_CHANNEL(cdaudio)
|
||||
|
||||
typedef struct {
|
||||
UINT16 wDevID;
|
||||
UINT wDevID;
|
||||
int nUseCount; /* Incremented for each shared open */
|
||||
BOOL16 fShareable; /* TRUE if first open was shareable */
|
||||
BOOL fShareable; /* TRUE if first open was shareable */
|
||||
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
|
||||
HANDLE16 hCallback; /* Callback handle for pending notification */
|
||||
MCI_OPEN_PARMS16 openParms;
|
||||
HANDLE hCallback; /* Callback handle for pending notification */
|
||||
DWORD dwTimeFormat;
|
||||
WINE_CDAUDIO wcda;
|
||||
int mciMode;
|
||||
|
@ -62,7 +61,7 @@ static DWORD CDAUDIO_drvClose(DWORD dwDevID)
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciGetOpenDrv [internal]
|
||||
*/
|
||||
static WINE_MCICDAUDIO* CDAUDIO_mciGetOpenDrv(UINT16 wDevID)
|
||||
static WINE_MCICDAUDIO* CDAUDIO_mciGetOpenDrv(UINT wDevID)
|
||||
{
|
||||
WINE_MCICDAUDIO* wmcda = (WINE_MCICDAUDIO*)mciGetDriverData(wDevID);
|
||||
|
||||
|
@ -115,7 +114,7 @@ static int CDAUDIO_mciGetError(WINE_MCICDAUDIO* wmcda)
|
|||
static DWORD CDAUDIO_CalcFrame(WINE_MCICDAUDIO* wmcda, DWORD dwTime)
|
||||
{
|
||||
DWORD dwFrame = 0;
|
||||
UINT16 wTrack;
|
||||
UINT wTrack;
|
||||
|
||||
TRACE("(%p, %08lX, %lu);\n", wmcda, wmcda->dwTimeFormat, dwTime);
|
||||
|
||||
|
@ -155,10 +154,10 @@ static DWORD CDAUDIO_CalcFrame(WINE_MCICDAUDIO* wmcda, DWORD dwTime)
|
|||
static DWORD CDAUDIO_CalcTime(WINE_MCICDAUDIO* wmcda, DWORD dwFrame, LPDWORD lpRet)
|
||||
{
|
||||
DWORD dwTime = 0;
|
||||
UINT16 wTrack;
|
||||
UINT16 wMinutes;
|
||||
UINT16 wSeconds;
|
||||
UINT16 wFrames;
|
||||
UINT wTrack;
|
||||
UINT wMinutes;
|
||||
UINT wSeconds;
|
||||
UINT wFrames;
|
||||
|
||||
TRACE("(%p, %08lX, %lu);\n", wmcda, wmcda->dwTimeFormat, dwFrame);
|
||||
|
||||
|
@ -197,13 +196,13 @@ static DWORD CDAUDIO_CalcTime(WINE_MCICDAUDIO* wmcda, DWORD dwFrame, LPDWORD lpR
|
|||
return dwTime;
|
||||
}
|
||||
|
||||
static DWORD CDAUDIO_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms);
|
||||
static DWORD CDAUDIO_mciStop(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms);
|
||||
static DWORD CDAUDIO_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms);
|
||||
static DWORD CDAUDIO_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms);
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_mciOpen [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpOpenParms)
|
||||
static DWORD CDAUDIO_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpOpenParms)
|
||||
{
|
||||
DWORD dwDeviceID;
|
||||
WINE_MCICDAUDIO* wmcda = (WINE_MCICDAUDIO*)mciGetDriverData(wDevID);
|
||||
|
@ -233,13 +232,6 @@ static DWORD CDAUDIO_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpO
|
|||
/* return MCIERR_NO_ELEMENT_ALLOWED; */
|
||||
}
|
||||
|
||||
wmcda->openParms.dwCallback = lpOpenParms->dwCallback;
|
||||
wmcda->openParms.wDeviceID = (WORD)lpOpenParms->wDeviceID;
|
||||
wmcda->openParms.wReserved0 = 0; /*????*/
|
||||
wmcda->openParms.lpstrDeviceType = lpOpenParms->lpstrDeviceType;
|
||||
wmcda->openParms.lpstrElementName = lpOpenParms->lpstrElementName;
|
||||
wmcda->openParms.lpstrAlias = lpOpenParms->lpstrAlias;
|
||||
|
||||
wmcda->wNotifyDeviceID = dwDeviceID;
|
||||
if (CDAUDIO_Open(&wmcda->wcda) == -1) {
|
||||
--wmcda->nUseCount;
|
||||
|
@ -260,7 +252,7 @@ static DWORD CDAUDIO_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpO
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciClose [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciClose(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
WINE_MCICDAUDIO* wmcda = CDAUDIO_mciGetOpenDrv(wDevID);
|
||||
|
||||
|
@ -281,7 +273,7 @@ static DWORD CDAUDIO_mciClose(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciGetDevCaps [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags,
|
||||
static DWORD CDAUDIO_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
||||
LPMCI_GETDEVCAPS_PARMS lpParms)
|
||||
{
|
||||
DWORD ret = 0;
|
||||
|
@ -345,7 +337,7 @@ static DWORD CDAUDIO_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags,
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciInfo [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMS16 lpParms)
|
||||
static DWORD CDAUDIO_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMSA lpParms)
|
||||
{
|
||||
LPSTR str = 0;
|
||||
WINE_MCICDAUDIO* wmcda = CDAUDIO_mciGetOpenDrv(wDevID);
|
||||
|
@ -372,7 +364,7 @@ static DWORD CDAUDIO_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMS16 lp
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciStatus [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
||||
{
|
||||
WINE_MCICDAUDIO* wmcda = CDAUDIO_mciGetOpenDrv(wDevID);
|
||||
DWORD ret = 0;
|
||||
|
@ -384,8 +376,8 @@ static DWORD CDAUDIO_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS
|
|||
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
|
||||
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
}
|
||||
if (dwFlags & MCI_STATUS_ITEM) {
|
||||
switch (lpParms->dwItem) {
|
||||
|
@ -490,7 +482,7 @@ static DWORD CDAUDIO_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciPlay [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
{
|
||||
int start, end;
|
||||
WINE_MCICDAUDIO* wmcda = CDAUDIO_mciGetOpenDrv(wDevID);
|
||||
|
@ -530,7 +522,7 @@ static DWORD CDAUDIO_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpPa
|
|||
if (dwFlags & MCI_NOTIFY) {
|
||||
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
/*
|
||||
mciDriverNotify((HWND16)LOWORD(lpParms->dwCallback),
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
*/
|
||||
}
|
||||
|
@ -541,7 +533,7 @@ static DWORD CDAUDIO_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpPa
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciStop [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciStop(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
WINE_MCICDAUDIO* wmcda = CDAUDIO_mciGetOpenDrv(wDevID);
|
||||
|
||||
|
@ -555,8 +547,8 @@ static DWORD CDAUDIO_mciStop(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS l
|
|||
wmcda->mciMode = MCI_MODE_STOP;
|
||||
if (lpParms && (dwFlags & MCI_NOTIFY)) {
|
||||
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
|
||||
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -564,7 +556,7 @@ static DWORD CDAUDIO_mciStop(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS l
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciPause [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciPause(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
WINE_MCICDAUDIO* wmcda = CDAUDIO_mciGetOpenDrv(wDevID);
|
||||
|
||||
|
@ -577,8 +569,8 @@ static DWORD CDAUDIO_mciPause(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS
|
|||
wmcda->mciMode = MCI_MODE_PAUSE;
|
||||
if (lpParms && (dwFlags & MCI_NOTIFY)) {
|
||||
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
|
||||
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -586,7 +578,7 @@ static DWORD CDAUDIO_mciPause(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciResume [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciResume(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
WINE_MCICDAUDIO* wmcda = CDAUDIO_mciGetOpenDrv(wDevID);
|
||||
|
||||
|
@ -599,7 +591,7 @@ static DWORD CDAUDIO_mciResume(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS
|
|||
wmcda->mciMode = MCI_MODE_STOP;
|
||||
if (lpParms && (dwFlags & MCI_NOTIFY)) {
|
||||
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
}
|
||||
return 0;
|
||||
|
@ -608,7 +600,7 @@ static DWORD CDAUDIO_mciResume(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciSeek [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
||||
{
|
||||
DWORD at;
|
||||
WINE_MCICDAUDIO* wmcda = CDAUDIO_mciGetOpenDrv(wDevID);
|
||||
|
@ -641,7 +633,7 @@ static DWORD CDAUDIO_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpPa
|
|||
}
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
|
||||
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
}
|
||||
return 0;
|
||||
|
@ -650,7 +642,7 @@ static DWORD CDAUDIO_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpPa
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciSetDoor [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciSetDoor(UINT16 wDevID, int open)
|
||||
static DWORD CDAUDIO_mciSetDoor(UINT wDevID, int open)
|
||||
{
|
||||
WINE_MCICDAUDIO* wmcda = CDAUDIO_mciGetOpenDrv(wDevID);
|
||||
|
||||
|
@ -667,7 +659,7 @@ static DWORD CDAUDIO_mciSetDoor(UINT16 wDevID, int open)
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciSet [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
{
|
||||
WINE_MCICDAUDIO* wmcda = CDAUDIO_mciGetOpenDrv(wDevID);
|
||||
|
||||
|
@ -708,7 +700,7 @@ static DWORD CDAUDIO_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParm
|
|||
if (dwFlags & MCI_NOTIFY) {
|
||||
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n",
|
||||
lpParms->dwCallback);
|
||||
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
}
|
||||
return 0;
|
||||
|
@ -735,7 +727,7 @@ LONG CALLBACK MCICDAUDIO_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
|
|||
case MCI_OPEN_DRIVER: return CDAUDIO_mciOpen(dwDevID, dwParam1, (LPMCI_OPEN_PARMSA)dwParam2);
|
||||
case MCI_CLOSE_DRIVER: return CDAUDIO_mciClose(dwDevID, dwParam1, (LPMCI_GENERIC_PARMS)dwParam2);
|
||||
case MCI_GETDEVCAPS: return CDAUDIO_mciGetDevCaps(dwDevID, dwParam1, (LPMCI_GETDEVCAPS_PARMS)dwParam2);
|
||||
case MCI_INFO: return CDAUDIO_mciInfo(dwDevID, dwParam1, (LPMCI_INFO_PARMS16)dwParam2);
|
||||
case MCI_INFO: return CDAUDIO_mciInfo(dwDevID, dwParam1, (LPMCI_INFO_PARMSA)dwParam2);
|
||||
case MCI_STATUS: return CDAUDIO_mciStatus(dwDevID, dwParam1, (LPMCI_STATUS_PARMS)dwParam2);
|
||||
case MCI_SET: return CDAUDIO_mciSet(dwDevID, dwParam1, (LPMCI_SET_PARMS)dwParam2);
|
||||
case MCI_PLAY: return CDAUDIO_mciPlay(dwDevID, dwParam1, (LPMCI_PLAY_PARMS)dwParam2);
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "winuser.h"
|
||||
#include "multimedia.h"
|
||||
#include "mmddk.h"
|
||||
#include "oss.h"
|
||||
#include "driver.h"
|
||||
#include "debugtools.h"
|
||||
#include "heap.h"
|
||||
|
@ -27,6 +28,8 @@ DEFAULT_DEBUG_CHANNEL(midi)
|
|||
|
||||
#ifdef HAVE_OSS_MIDI
|
||||
|
||||
#define MIDI_SEQ "/dev/sequencer"
|
||||
|
||||
typedef struct {
|
||||
int state;
|
||||
DWORD bufsize;
|
||||
|
@ -128,13 +131,13 @@ static int MIDI_UnixToWindowsDeviceType(int type)
|
|||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
* MULTIMEDIA_MidiInit [internal]
|
||||
* OSS_MidiInit [internal]
|
||||
*
|
||||
* Initializes the MIDI devices information variables
|
||||
*
|
||||
*/
|
||||
/* FIXME: this function shall be moved to the OSS drivers DLL entry point */
|
||||
BOOL MULTIMEDIA_MidiInit(void)
|
||||
BOOL OSS_MidiInit(void)
|
||||
{
|
||||
#ifdef HAVE_OSS_MIDI
|
||||
int i, status, numsynthdevs = 255, nummididevs = 255;
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
#include "windef.h"
|
||||
#include "user.h"
|
||||
#include "driver.h"
|
||||
#include "multimedia.h"
|
||||
#include "mmddk.h"
|
||||
#include "oss.h"
|
||||
#include "debugtools.h"
|
||||
|
||||
DEFAULT_DEBUG_CHANNEL(mmaux)
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
#include <sys/ioctl.h>
|
||||
#include "windef.h"
|
||||
#include "driver.h"
|
||||
#include "multimedia.h"
|
||||
#include "mmddk.h"
|
||||
#include "oss.h"
|
||||
|
||||
#include "debugtools.h"
|
||||
|
||||
DEFAULT_DEBUG_CHANNEL(mmaux)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "heap.h"
|
||||
#include "user.h"
|
||||
#include "driver.h"
|
||||
#include "multimedia.h"
|
||||
#include "winemm.h"
|
||||
#include "syslevel.h"
|
||||
#include "callback.h"
|
||||
#include "selectors.h"
|
||||
|
@ -70,7 +70,8 @@ BOOL WINAPI WINMM_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
|||
switch (fdwReason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
if (!bInitDone) { /* to be done only once */
|
||||
if (!MULTIMEDIA_MidiInit() || !MULTIMEDIA_MciInit()) {
|
||||
/* FIXME: OSS_MidiInit() shall be moved to OSS low level driver */
|
||||
if (!OSS_MidiInit() || !MULTIMEDIA_MciInit()) {
|
||||
return FALSE;
|
||||
}
|
||||
bInitDone = TRUE;
|
||||
|
@ -1733,7 +1734,7 @@ UINT16 WINAPI mciDriverYield16(UINT16 uDeviceID)
|
|||
|
||||
/* TRACE("(%04x)\n", uDeviceID); */
|
||||
|
||||
if (!(wmd = MCI_GetDriver(uDeviceID)) || wmd->lpfnYieldProc || wmd->bIs32) {
|
||||
if (!(wmd = MCI_GetDriver(uDeviceID)) || !wmd->lpfnYieldProc || wmd->bIs32) {
|
||||
UserYield16();
|
||||
} else {
|
||||
ret = wmd->lpfnYieldProc(uDeviceID, wmd->dwYieldData);
|
||||
|
@ -1752,7 +1753,7 @@ UINT WINAPI mciDriverYield(UINT uDeviceID)
|
|||
|
||||
TRACE("(%04x)\n", uDeviceID);
|
||||
|
||||
if (!(wmd = MCI_GetDriver(uDeviceID)) || wmd->lpfnYieldProc || wmd->bIs32) {
|
||||
if (!(wmd = MCI_GetDriver(uDeviceID)) || !wmd->lpfnYieldProc || !wmd->bIs32) {
|
||||
UserYield16();
|
||||
} else {
|
||||
ret = wmd->lpfnYieldProc(uDeviceID, wmd->dwYieldData);
|
||||
|
@ -3990,7 +3991,6 @@ DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage,
|
|||
case WODM_PAUSE:
|
||||
case WODM_PREPARE:
|
||||
case WODM_UNPREPARE:
|
||||
case WODM_STOP:
|
||||
case WODM_CLOSE:
|
||||
/* no argument conversion needed */
|
||||
break;
|
||||
|
@ -4027,7 +4027,6 @@ DWORD WINAPI waveOutMessage16(HWAVEOUT16 hWaveOut, UINT16 uMessage,
|
|||
case WODM_SETPLAYBACKRATE:
|
||||
case WODM_RESET:
|
||||
case WODM_PAUSE:
|
||||
case WODM_STOP:
|
||||
case WODM_CLOSE:
|
||||
/* no argument conversion needed */
|
||||
break;
|
||||
|
@ -4153,7 +4152,7 @@ UINT16 WINAPI waveInGetErrorText16(UINT16 uError, LPSTR lpText, UINT16 uSize)
|
|||
* waveInOpen [WINMM.154]
|
||||
*/
|
||||
UINT WINAPI waveInOpen(HWAVEIN* lphWaveIn, UINT uDeviceID,
|
||||
const LPWAVEFORMAT lpFormat, DWORD dwCallback,
|
||||
const LPWAVEFORMATEX lpFormat, DWORD dwCallback,
|
||||
DWORD dwInstance, DWORD dwFlags)
|
||||
{
|
||||
HWAVEIN16 hwin16;
|
||||
|
@ -4167,7 +4166,7 @@ UINT WINAPI waveInOpen(HWAVEIN* lphWaveIn, UINT uDeviceID,
|
|||
* waveInOpen [MMSYSTEM.504]
|
||||
*/
|
||||
UINT16 WINAPI waveInOpen16(HWAVEIN16* lphWaveIn, UINT16 uDeviceID,
|
||||
const LPWAVEFORMAT lpFormat, DWORD dwCallback,
|
||||
const LPWAVEFORMATEX lpFormat, DWORD dwCallback,
|
||||
DWORD dwInstance, DWORD dwFlags)
|
||||
{
|
||||
HWAVEIN16 hWaveIn;
|
||||
|
@ -4190,7 +4189,7 @@ UINT16 WINAPI waveInOpen16(HWAVEIN16* lphWaveIn, UINT16 uDeviceID,
|
|||
lpDesc = (LPWAVEOPENDESC) USER_HEAP_LIN_ADDR(hWaveIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_NOMEM;
|
||||
lpDesc->hWave = hWaveIn;
|
||||
lpDesc->lpFormat = lpFormat;
|
||||
lpDesc->lpFormat = (LPWAVEFORMAT)lpFormat;
|
||||
lpDesc->dwCallBack = dwCallback;
|
||||
lpDesc->dwInstance = dwInstance;
|
||||
while (uDeviceID < MAXWAVEDRIVERS) {
|
||||
|
@ -4514,7 +4513,6 @@ DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage,
|
|||
case WIDM_PREPARE:
|
||||
case WIDM_UNPREPARE:
|
||||
case WIDM_ADDBUFFER:
|
||||
case WIDM_PAUSE:
|
||||
/* no argument conversion needed */
|
||||
break;
|
||||
case WIDM_GETDEVCAPS:
|
||||
|
@ -4549,7 +4547,6 @@ DWORD WINAPI waveInMessage16(HWAVEIN16 hWaveIn, UINT16 uMessage,
|
|||
case WIDM_STOP:
|
||||
case WIDM_RESET:
|
||||
case WIDM_START:
|
||||
case WIDM_PAUSE:
|
||||
/* no argument conversion needed */
|
||||
break;
|
||||
case WIDM_GETDEVCAPS:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <sys/time.h>
|
||||
#include "winbase.h"
|
||||
#include "callback.h"
|
||||
#include "multimedia.h"
|
||||
#include "winemm.h"
|
||||
#include "services.h"
|
||||
#include "syslevel.h"
|
||||
#include "debugtools.h"
|
||||
|
@ -28,9 +28,8 @@ DEFAULT_DEBUG_CHANNEL(mmtime)
|
|||
|
||||
static void TIME_TriggerCallBack(LPWINE_TIMERENTRY lpTimer, DWORD dwCurrent)
|
||||
{
|
||||
TRACE("before CallBack (%lu)!\n", dwCurrent);
|
||||
TRACE("lpFunc=%p wTimerID=%04X dwUser=%08lX !\n",
|
||||
lpTimer->lpFunc, lpTimer->wTimerID, lpTimer->dwUser);
|
||||
TRACE("before CallBack (%lu) => lpFunc=%p wTimerID=%04X dwUser=%08lX !\n",
|
||||
dwCurrent, lpTimer->lpFunc, lpTimer->wTimerID, lpTimer->dwUser);
|
||||
|
||||
/* - TimeProc callback that is called here is something strange, under Windows 3.1x it is called
|
||||
* during interrupt time, is allowed to execute very limited number of API calls (like
|
||||
|
@ -89,11 +88,11 @@ static void CALLBACK TIME_MMSysTimeCallback(ULONG_PTR ptr_)
|
|||
EnterCriticalSection(&iData->cs);
|
||||
for (lpTimer = iData->lpTimerList; lpTimer != NULL; ) {
|
||||
lpNextTimer = lpTimer->lpNext;
|
||||
if (lpTimer->wCurTime < MMSYSTIME_MININTERVAL) {
|
||||
if (lpTimer->uCurTime < MMSYSTIME_MININTERVAL) {
|
||||
/* since lpTimer->wDelay is >= MININTERVAL, wCurTime value
|
||||
* shall be correct (>= 0)
|
||||
*/
|
||||
lpTimer->wCurTime += lpTimer->wDelay - MMSYSTIME_MININTERVAL;
|
||||
lpTimer->uCurTime += lpTimer->wDelay - MMSYSTIME_MININTERVAL;
|
||||
if (lpTimer->lpFunc) {
|
||||
if (idx == iData->nSizeLpTimers) {
|
||||
iData->lpTimers = (LPWINE_TIMERENTRY)
|
||||
|
@ -103,17 +102,18 @@ static void CALLBACK TIME_MMSysTimeCallback(ULONG_PTR ptr_)
|
|||
}
|
||||
iData->lpTimers[idx++] = *lpTimer;
|
||||
}
|
||||
if (lpTimer->wFlags & TIME_ONESHOT)
|
||||
/* TIME_ONESHOT is defined as 0 */
|
||||
if (!(lpTimer->wFlags & TIME_PERIODIC))
|
||||
timeKillEvent(lpTimer->wTimerID);
|
||||
} else {
|
||||
lpTimer->wCurTime -= MMSYSTIME_MININTERVAL;
|
||||
lpTimer->uCurTime -= MMSYSTIME_MININTERVAL;
|
||||
}
|
||||
lpTimer = lpNextTimer;
|
||||
}
|
||||
LeaveCriticalSection(&iData->cs);
|
||||
|
||||
while (idx > 0) {
|
||||
TIME_TriggerCallBack(iData->lpTimers + --idx, iData->mmSysTimeMS);
|
||||
TIME_TriggerCallBack(&iData->lpTimers[--idx], iData->mmSysTimeMS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -213,15 +213,13 @@ static WORD timeSetEventInternal(UINT wDelay, UINT wResol,
|
|||
if (!iData)
|
||||
return 0;
|
||||
|
||||
lpNewTimer->wCurTime = wDelay;
|
||||
lpNewTimer->uCurTime = wDelay;
|
||||
lpNewTimer->wDelay = wDelay;
|
||||
lpNewTimer->wResol = wResol;
|
||||
lpNewTimer->lpFunc = lpFunc;
|
||||
lpNewTimer->dwUser = dwUser;
|
||||
lpNewTimer->wFlags = wFlags;
|
||||
|
||||
TRACE("lpFunc=0x%08lx !\n", (DWORD)lpFunc);
|
||||
|
||||
EnterCriticalSection(&iData->cs);
|
||||
|
||||
for (lpTimer = iData->lpTimerList; lpTimer != NULL; lpTimer = lpTimer->lpNext) {
|
||||
|
@ -234,6 +232,8 @@ static WORD timeSetEventInternal(UINT wDelay, UINT wResol,
|
|||
|
||||
LeaveCriticalSection(&iData->cs);
|
||||
|
||||
TRACE("=> %u\n", wNewID + 1);
|
||||
|
||||
return wNewID + 1;
|
||||
}
|
||||
|
||||
|
@ -272,19 +272,25 @@ MMRESULT WINAPI timeKillEvent(UINT wID)
|
|||
LPWINE_MM_IDATA iData = MULTIMEDIA_GetIData();
|
||||
MMRESULT ret = MMSYSERR_INVALPARAM;
|
||||
|
||||
TRACE("(%u)\n", wID);
|
||||
EnterCriticalSection(&iData->cs);
|
||||
/* remove WINE_TIMERENTRY from list */
|
||||
for (lpTimer = &iData->lpTimerList; *lpTimer; lpTimer = &((*lpTimer)->lpNext)) {
|
||||
for (lpTimer = &iData->lpTimerList; *lpTimer; lpTimer = &(*lpTimer)->lpNext) {
|
||||
if (wID == (*lpTimer)->wTimerID) {
|
||||
*lpTimer = (*lpTimer)->lpNext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
LeaveCriticalSection(&iData->cs);
|
||||
|
||||
if (*lpTimer) {
|
||||
HeapFree(GetProcessHeap(), 0, *lpTimer);
|
||||
LPWINE_TIMERENTRY lpTemp = *lpTimer;
|
||||
|
||||
/* unlink timer of id 'wID' */
|
||||
*lpTimer = (*lpTimer)->lpNext;
|
||||
HeapFree(GetProcessHeap(), 0, lpTemp);
|
||||
ret = TIMERR_NOERROR;
|
||||
} else {
|
||||
WARN("wID=%u is not a valid timer ID\n", wID);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* MMSYSTEM...)
|
||||
*/
|
||||
|
||||
#include "mmsystem.h"
|
||||
#include "mmddk.h"
|
||||
#include "winnls.h"
|
||||
|
||||
/* Add your language specific defines here */
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
#include "driver.h"
|
||||
#include "ldt.h"
|
||||
#include "module.h"
|
||||
#include "debugtools.h"
|
||||
#include "mmsystem.h"
|
||||
#include "mmddk.h"
|
||||
#include "debugtools.h"
|
||||
|
||||
DEFAULT_DEBUG_CHANNEL(driver)
|
||||
|
||||
|
|
Loading…
Reference in New Issue