1 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
3 /*****************************************************************************
4 * Copyright 1998, Luiz Otavio L. Zorzella
7 * Purpose: multimedia declarations
9 *****************************************************************************
11 #ifndef __WINE_MULTIMEDIA_H
12 #define __WINE_MULTIMEDIA_H
16 #define MAX_MIDIINDRV (16)
17 /* For now I'm making 16 the maximum number of midi devices one can
18 * have. This should be more than enough for everybody. But as a purist,
19 * I intend to make it unbounded in the future, as soon as I figure
20 * a good way to do so.
22 #define MAX_MIDIOUTDRV (16)
24 #if defined(HAVE_SYS_SOUNDCARD_H)
25 # include <sys/soundcard.h>
26 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
27 # include <machine/soundcard.h>
28 #elif defined(HAVE_SOUNDCARD_H)
29 # include <soundcard.h>
32 #include <sys/errno.h>
35 #define MIDI_SEQ "/dev/sequencer"
37 #define MIDI_DEV "/dev/midi"
41 #define IOCTL(a,b,c) ioctl(a,b,&c)
43 #define IOCTL(a,b,c) (c = ioctl(a,b,c))
48 DRIVERPROC16 driverProc;
49 MCI_OPEN_DRIVER_PARMS16 modp;
52 YIELDPROC lpfnYieldProc;
58 extern WINE_MCIDRIVER mciDrv[MAXMCIDRIVERS];
60 #define WINE_MMTHREAD_CREATED 0x4153494C /* "BSIL" */
61 #define WINE_MMTHREAD_DELETED 0xDEADDEAD
64 DWORD dwSignature; /* 00 "BSIL" when ok, 0xDEADDEAD when being deleted */
65 DWORD dwCounter; /* 04 */
66 HANDLE hThread; /* 08 hThread */
67 DWORD dwThreadId; /* 0C */
68 FARPROC16 fpThread; /* 10 segmented address of thread proc */
69 DWORD dwThreadPmt; /* 14 parameter to be called upon thread creation */
70 DWORD dwUnknown3; /* 18 increment interlocked ? */
71 DWORD hEvent; /* 1C event */
72 DWORD dwUnknown5; /* 20 */
73 DWORD dwStatus; /* 24 0, 10, 20, 30 */
74 DWORD dwFlags; /* 28 dwFlags upon creation */
75 HANDLE16 hTask; /* 2C handle to created task */
78 #define MCI_GetDrv(wDevID) (&mciDrv[MCI_DevIDToIndex(wDevID)])
79 #define MCI_GetOpenDrv(wDevID) (&(MCI_GetDrv(wDevID)->mop))
81 /* function prototypes */
82 extern BOOL MULTIMEDIA_Init(void);
84 extern int MCI_DevIDToIndex(UINT16 wDevID);
85 extern UINT16 MCI_FirstDevID(void);
86 extern UINT16 MCI_NextDevID(UINT16 wDevID);
87 extern BOOL MCI_DevIDValid(UINT16 wDevID);
89 extern int MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam);
90 extern int MCI_UnMapMsg16To32A(WORD uDevTyp, WORD wMsg, DWORD lParam);
92 extern DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms);
93 extern DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms);
94 extern DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSA lpParms);
96 typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, DWORD, DWORD);
97 typedef LONG (*MCIPROC)(DWORD, HDRVR16, DWORD, DWORD, DWORD);
99 extern WORD MCI_GetDevType(LPCSTR str);
100 extern DWORD MCI_WriteString(LPSTR lpDstStr, DWORD dstSize, LPCSTR lpSrcStr);
101 extern const char* MCI_CommandToString(UINT16 wMsg);
103 extern int mciInstalledCount;
104 extern int mciInstalledListLen;
105 extern LPSTR lpmciInstallNames;
107 extern UINT16 MCI_DefYieldProc(UINT16 wDevID, DWORD data);
115 extern MCI_WineDesc MCI_InternalDescriptors[];
117 extern LRESULT MCI_CleanUp(LRESULT dwRet, UINT wMsg, DWORD dwParam2, BOOL bIs32);
119 extern DWORD MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD dwParam1, DWORD dwParam2);
120 extern DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, DWORD dwParam2, UINT size);
122 LONG MCIWAVE_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
123 DWORD dwParam1, DWORD dwParam2);
124 LONG MCIMIDI_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
125 DWORD dwParam1, DWORD dwParam2);
126 LONG MCICDAUDIO_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
127 DWORD dwParam1, DWORD dwParam2);
128 LONG MCIANIM_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
129 DWORD dwParam1, DWORD dwParam2);
130 LONG MCIAVI_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
131 DWORD dwParam1, DWORD dwParam2);
133 #endif /* __WINE_MULTIMEDIA_H */