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

Changed some interface names.
This commit is contained in:
Eric Pouech 1999-03-15 15:42:26 +00:00 committed by Alexandre Julliard
parent efba9f8079
commit a9ffdcf903
8 changed files with 2007 additions and 1366 deletions

View File

@ -2,7 +2,7 @@ name mmsystem
type win16 type win16
#1 pascal MMSYSTEM_WEP(word word word ptr) MMSYSTEM_WEP #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 3 stub PLAYSOUND
5 pascal mmsystemGetVersion() mmsystemGetVersion16 5 pascal mmsystemGetVersion() mmsystemGetVersion16
6 pascal DriverProc(long word word long long) DriverProc16 6 pascal DriverProc(long word word long long) DriverProc16

File diff suppressed because it is too large Load Diff

View File

@ -49,38 +49,59 @@ struct WINE_MCIDRIVER {
DWORD dwPrivate; 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 */ /* function prototypes */
extern BOOL MULTIMEDIA_Init(void); extern BOOL MULTIMEDIA_Init(void);
extern int MCI_DevIDToIndex(UINT16 wDevID); extern int MCI_DevIDToIndex(UINT16 wDevID);
extern UINT16 MCI_FirstDevID(void); extern UINT16 MCI_FirstDevID(void);
extern UINT16 MCI_NextDevID(UINT16 wDevID); extern UINT16 MCI_NextDevID(UINT16 wDevID);
extern BOOL MCI_DevIDValid(UINT16 wDevID); extern BOOL MCI_DevIDValid(UINT16 wDevID);
extern int MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam); extern int MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam);
extern int MCI_UnMapMsg16To32A(WORD uDevTyp, WORD wMsg, DWORD lParam); extern int MCI_UnMapMsg16To32A(WORD uDevTyp, WORD wMsg, DWORD lParam);
typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, DWORD, DWORD); extern DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms);
typedef LONG (*MCIPROC)(DWORD, HDRVR16, DWORD, DWORD, DWORD); extern DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms);
extern DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSA lpParms);
extern MCIPROC MCI_GetProc(UINT16 uDevType); typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, DWORD, DWORD);
extern WORD MCI_GetDevType(LPCSTR str); typedef LONG (*MCIPROC)(DWORD, HDRVR16, DWORD, DWORD, DWORD);
extern DWORD MCI_WriteString(LPSTR lpDstStr, DWORD dstSize, LPCSTR lpSrcStr);
extern const char* MCI_CommandToString(UINT16 wMsg);
extern WORD MCI_GetDevType(LPCSTR str);
extern DWORD MCI_WriteString(LPSTR lpDstStr, DWORD dstSize, LPCSTR lpSrcStr);
extern const char* MCI_CommandToString(UINT16 wMsg);
extern DWORD MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD dwParam1, DWORD dwParam2); extern int mciInstalledCount;
extern DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, DWORD dwParam2, UINT size); extern int mciInstalledListLen;
extern LPSTR lpmciInstallNames;
LONG MCIWAVE_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, typedef struct {
DWORD dwParam1, DWORD dwParam2); WORD uDevType;
LONG MCIMIDI_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, char* lpstrName;
DWORD dwParam1, DWORD dwParam2); MCIPROC lpfnProc;
LONG MCICDAUDIO_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, } MCI_WineDesc;
DWORD dwParam1, DWORD dwParam2);
LONG MCIANIM_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, extern MCI_WineDesc MCI_InternalDescriptors[];
DWORD dwParam1, DWORD dwParam2);
LONG MCIAVI_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, extern LRESULT MCI_CleanUp(LRESULT dwRet, UINT wMsg, DWORD dwParam2, BOOL bIs32);
DWORD dwParam1, DWORD dwParam2);
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_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
#endif /* __WINE_MULTIMEDIA_H */ #endif /* __WINE_MULTIMEDIA_H */

View File

@ -11,6 +11,7 @@ C_SRCS = \
dsound.c \ dsound.c \
init.c \ init.c \
joystick.c \ joystick.c \
mci.c \
mcianim.c \ mcianim.c \
mciavi.c \ mciavi.c \
mcicda.c \ mcicda.c \

1331
multimedia/mci.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -27,13 +27,6 @@
#include "debug.h" #include "debug.h"
#include "xmalloc.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 /* The reason why I just don't lowercase the keywords array in
* mciSendString is left as an exercise to the reader. * mciSendString is left as an exercise to the reader.
*/ */
@ -52,14 +45,14 @@ extern struct WINE_MCIDRIVER mciDrv[MAXMCIDRIVERS];
do { \ do { \
TRACE(mci, "->returns '%s'\n", s); \ TRACE(mci, "->returns '%s'\n", s); \
if (lpstrReturnString) { \ if (lpstrReturnString) { \
lstrcpynA(lpstrReturnString, s, uReturnLength); \ lstrcpynA(lpstrReturnString, s, uReturnLength); \
TRACE(mci, "-->'%s'\n", lpstrReturnString); \ TRACE(mci, "-->'%s'\n", lpstrReturnString); \
} \ } \
} while(0) } while(0)
/* print a DWORD in the specified timeformat */ /* print a DWORD in the specified timeformat */
static void static void
_MCISTR_printtf(char *buf,UINT16 uDevType,DWORD timef,DWORD val) _MCISTR_printtf(char *buf, UINT16 uDevType, DWORD timef, DWORD val)
{ {
*buf = '\0'; *buf = '\0';
switch (timef) { switch (timef) {
@ -106,8 +99,8 @@ _MCISTR_printtf(char *buf,UINT16 uDevType,DWORD timef,DWORD val)
#define _MCISTR_devtype 9 #define _MCISTR_devtype 9
static void static void
_MCISTR_convreturn(int type,DWORD dwReturn,LPSTR lpstrReturnString, _MCISTR_convreturn(int type, DWORD dwReturn, LPSTR lpstrReturnString,
WORD uReturnLength,WORD uDevTyp,int timef) WORD uReturnLength, WORD uDevTyp, int timef)
{ {
switch (type) { switch (type) {
case _MCISTR_vdmtype: 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, DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrReturnString,
UINT uReturnLength, HWND hwndCallback) 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, DWORD WINAPI mciSendStringW(LPCWSTR lpwstrCommand, LPSTR lpstrReturnString,
UINT uReturnLength, HWND hwndCallback) UINT uReturnLength, HWND hwndCallback)

File diff suppressed because it is too large Load Diff

View File

@ -135,8 +135,8 @@ type win32
132 stdcall mmioStringToFOURCCW(wstr long) mmioStringToFOURCCW 132 stdcall mmioStringToFOURCCW(wstr long) mmioStringToFOURCCW
133 stdcall mmioWrite(long ptr long) mmioWrite 133 stdcall mmioWrite(long ptr long) mmioWrite
134 stdcall mmsystemGetVersion() mmsystemGetVersion 134 stdcall mmsystemGetVersion() mmsystemGetVersion
135 stdcall sndPlaySoundA(ptr long) sndPlaySound 135 stdcall sndPlaySoundA(ptr long) sndPlaySoundA
136 stdcall sndPlaySoundW(ptr long) sndPlaySound32W 136 stdcall sndPlaySoundW(ptr long) sndPlaySoundW
137 stdcall timeBeginPeriod(long) timeBeginPeriod 137 stdcall timeBeginPeriod(long) timeBeginPeriod
138 stdcall timeEndPeriod(long) timeEndPeriod 138 stdcall timeEndPeriod(long) timeEndPeriod
139 stdcall timeGetDevCaps(ptr long) timeGetDevCaps 139 stdcall timeGetDevCaps(ptr long) timeGetDevCaps