Commit a9ffdcf9 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Moved all MCI internal functions/variables/macros to mci.c.

Changed some interface names.
parent efba9f80
......@@ -2,7 +2,7 @@ name mmsystem
type win16
#1 pascal MMSYSTEM_WEP(word word word ptr) MMSYSTEM_WEP
2 pascal SNDPLAYSOUND(ptr word) sndPlaySound
2 pascal SNDPLAYSOUND(ptr word) sndPlaySoundA
3 stub PLAYSOUND
5 pascal mmsystemGetVersion() mmsystemGetVersion16
6 pascal DriverProc(long word word long long) DriverProc16
......
......@@ -49,38 +49,59 @@ struct WINE_MCIDRIVER {
DWORD dwPrivate;
};
extern struct WINE_MCIDRIVER mciDrv[MAXMCIDRIVERS];
#define MCI_GetDrv(wDevID) (&mciDrv[MCI_DevIDToIndex(wDevID)])
#define MCI_GetOpenDrv(wDevID) (&(MCI_GetDrv(wDevID)->mop))
/* function prototypes */
extern BOOL MULTIMEDIA_Init(void);
extern int MCI_DevIDToIndex(UINT16 wDevID);
extern UINT16 MCI_FirstDevID(void);
extern UINT16 MCI_NextDevID(UINT16 wDevID);
extern BOOL MCI_DevIDValid(UINT16 wDevID);
extern int MCI_DevIDToIndex(UINT16 wDevID);
extern UINT16 MCI_FirstDevID(void);
extern UINT16 MCI_NextDevID(UINT16 wDevID);
extern BOOL MCI_DevIDValid(UINT16 wDevID);
extern int MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam);
extern int MCI_UnMapMsg16To32A(WORD uDevTyp, WORD wMsg, DWORD lParam);
extern DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms);
extern DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms);
extern DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSA lpParms);
typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, DWORD, DWORD);
typedef LONG (*MCIPROC)(DWORD, HDRVR16, DWORD, DWORD, DWORD);
extern WORD MCI_GetDevType(LPCSTR str);
extern DWORD MCI_WriteString(LPSTR lpDstStr, DWORD dstSize, LPCSTR lpSrcStr);
extern const char* MCI_CommandToString(UINT16 wMsg);
extern int MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam);
extern int MCI_UnMapMsg16To32A(WORD uDevTyp, WORD wMsg, DWORD lParam);
extern int mciInstalledCount;
extern int mciInstalledListLen;
extern LPSTR lpmciInstallNames;
typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, DWORD, DWORD);
typedef LONG (*MCIPROC)(DWORD, HDRVR16, DWORD, DWORD, DWORD);
typedef struct {
WORD uDevType;
char* lpstrName;
MCIPROC lpfnProc;
} MCI_WineDesc;
extern MCIPROC MCI_GetProc(UINT16 uDevType);
extern WORD MCI_GetDevType(LPCSTR str);
extern DWORD MCI_WriteString(LPSTR lpDstStr, DWORD dstSize, LPCSTR lpSrcStr);
extern const char* MCI_CommandToString(UINT16 wMsg);
extern MCI_WineDesc MCI_InternalDescriptors[];
extern LRESULT MCI_CleanUp(LRESULT dwRet, UINT wMsg, DWORD dwParam2, BOOL bIs32);
extern DWORD MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD dwParam1, DWORD dwParam2);
extern DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, DWORD dwParam2, UINT size);
extern DWORD MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD dwParam1, DWORD dwParam2);
extern DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, DWORD dwParam2, UINT size);
LONG MCIWAVE_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCIMIDI_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCICDAUDIO_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCIANIM_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCIAVI_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCIWAVE_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCIMIDI_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCICDAUDIO_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCIANIM_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCIAVI_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
#endif /* __WINE_MULTIMEDIA_H */
......@@ -11,6 +11,7 @@ C_SRCS = \
dsound.c \
init.c \
joystick.c \
mci.c \
mcianim.c \
mciavi.c \
mcicda.c \
......
......@@ -27,13 +27,6 @@
#include "debug.h"
#include "xmalloc.h"
/* FIXME the following definitions must be moved to mmsystem.c */
extern struct WINE_MCIDRIVER mciDrv[MAXMCIDRIVERS];
#define MCI_GetDrv(wDevID) (&mciDrv[MCI_DevIDToIndex(wDevID)])
#define MCI_GetOpenDrv(wDevID) (&(MCI_GetDrv(wDevID)->mop))
/* end of FIXME */
/* The reason why I just don't lowercase the keywords array in
* mciSendString is left as an exercise to the reader.
*/
......@@ -52,14 +45,14 @@ extern struct WINE_MCIDRIVER mciDrv[MAXMCIDRIVERS];
do { \
TRACE(mci, "->returns '%s'\n", s); \
if (lpstrReturnString) { \
lstrcpynA(lpstrReturnString, s, uReturnLength); \
lstrcpynA(lpstrReturnString, s, uReturnLength); \
TRACE(mci, "-->'%s'\n", lpstrReturnString); \
} \
} while(0)
/* print a DWORD in the specified timeformat */
static void
_MCISTR_printtf(char *buf,UINT16 uDevType,DWORD timef,DWORD val)
_MCISTR_printtf(char *buf, UINT16 uDevType, DWORD timef, DWORD val)
{
*buf = '\0';
switch (timef) {
......@@ -106,8 +99,8 @@ _MCISTR_printtf(char *buf,UINT16 uDevType,DWORD timef,DWORD val)
#define _MCISTR_devtype 9
static void
_MCISTR_convreturn(int type,DWORD dwReturn,LPSTR lpstrReturnString,
WORD uReturnLength,WORD uDevTyp,int timef)
_MCISTR_convreturn(int type, DWORD dwReturn, LPSTR lpstrReturnString,
WORD uReturnLength, WORD uDevTyp, int timef)
{
switch (type) {
case _MCISTR_vdmtype:
......@@ -2159,7 +2152,7 @@ DWORD WINAPI mciSendString16(LPCSTR lpstrCommand, LPSTR lpstrReturnString,
}
/**************************************************************************
* mciSendString32A [MMSYSTEM.702][WINMM.51]
* mciSendStringA [MMSYSTEM.702][WINMM.51]
*/
DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrReturnString,
UINT uReturnLength, HWND hwndCallback)
......@@ -2168,7 +2161,7 @@ DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrReturnString,
}
/**************************************************************************
* mciSendString32W [WINMM.52]
* mciSendStringW [WINMM.52]
*/
DWORD WINAPI mciSendStringW(LPCWSTR lpwstrCommand, LPSTR lpstrReturnString,
UINT uReturnLength, HWND hwndCallback)
......
......@@ -135,8 +135,8 @@ type win32
132 stdcall mmioStringToFOURCCW(wstr long) mmioStringToFOURCCW
133 stdcall mmioWrite(long ptr long) mmioWrite
134 stdcall mmsystemGetVersion() mmsystemGetVersion
135 stdcall sndPlaySoundA(ptr long) sndPlaySound
136 stdcall sndPlaySoundW(ptr long) sndPlaySound32W
135 stdcall sndPlaySoundA(ptr long) sndPlaySoundA
136 stdcall sndPlaySoundW(ptr long) sndPlaySoundW
137 stdcall timeBeginPeriod(long) timeBeginPeriod
138 stdcall timeEndPeriod(long) timeEndPeriod
139 stdcall timeGetDevCaps(ptr long) timeGetDevCaps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment