Added new_process and init_process request.
[wine] / include / multimedia.h
1 /*****************************************************************************
2  * Copyright 1998, Luiz Otavio L. Zorzella
3  *
4  * File:      multimedia.h
5  * Purpose:   multimedia declarations
6  *
7  *****************************************************************************
8  */
9 #ifndef __WINE_MULTIMEDIA_H 
10 #define __WINE_MULTIMEDIA_H
11
12 #include "mmsystem.h"
13
14 #define MAX_MIDIINDRV   (16)
15 /* For now I'm making 16 the maximum number of midi devices one can
16  * have. This should be more than enough for everybody. But as a purist,
17  * I intend to make it unbounded in the future, as soon as I figure
18  * a good way to do so.
19  */
20 #define MAX_MIDIOUTDRV  (16)
21
22 #if defined(HAVE_SYS_SOUNDCARD_H)
23 # include <sys/soundcard.h>
24 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
25 # include <machine/soundcard.h>
26 #elif defined(HAVE_SOUNDCARD_H)
27 # include <soundcard.h>
28 #endif
29
30 #include <sys/errno.h>
31
32 #ifdef HAVE_OSS
33 #define MIDI_SEQ "/dev/sequencer"
34 #else
35 #define MIDI_DEV "/dev/midi"
36 #endif
37
38 #ifdef SOUND_VERSION
39 #define IOCTL(a,b,c)            ioctl(a,b,&c)
40 #else
41 #define IOCTL(a,b,c)            (c = ioctl(a,b,c))
42 #endif
43
44 struct WINE_MCIDRIVER {
45         HDRVR16                 hDrv;
46         DRIVERPROC16            driverProc;
47         MCI_OPEN_DRIVER_PARMS16 modp;
48         MCI_OPEN_PARMS16        mop;
49         DWORD                   dwPrivate;
50 };
51
52 extern struct WINE_MCIDRIVER mciDrv[MAXMCIDRIVERS];
53
54 #define MCI_GetDrv(wDevID)              (&mciDrv[MCI_DevIDToIndex(wDevID)])
55 #define MCI_GetOpenDrv(wDevID)  (&(MCI_GetDrv(wDevID)->mop))
56
57 /* function prototypes */
58 extern BOOL MULTIMEDIA_Init(void);
59
60 extern int                      MCI_DevIDToIndex(UINT16 wDevID);
61 extern UINT16                   MCI_FirstDevID(void);
62 extern UINT16                   MCI_NextDevID(UINT16 wDevID);
63 extern BOOL                     MCI_DevIDValid(UINT16 wDevID);
64
65 extern int                      MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam);
66 extern int                      MCI_UnMapMsg16To32A(WORD uDevTyp, WORD wMsg, DWORD lParam);
67
68 extern DWORD                    MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms);
69 extern DWORD                    MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms);
70 extern DWORD                    MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSA lpParms);
71
72 typedef LONG                    (*MCIPROC16)(DWORD, HDRVR16,  WORD, DWORD, DWORD);
73 typedef LONG                    (*MCIPROC)(DWORD, HDRVR16, DWORD, DWORD, DWORD);
74
75 extern WORD                     MCI_GetDevType(LPCSTR str);
76 extern DWORD                    MCI_WriteString(LPSTR lpDstStr, DWORD dstSize, LPCSTR lpSrcStr);
77 extern const char*              MCI_CommandToString(UINT16 wMsg);
78
79 extern int                      mciInstalledCount;
80 extern int                      mciInstalledListLen;
81 extern LPSTR                    lpmciInstallNames;
82
83 typedef struct {
84     WORD        uDevType;
85     char*       lpstrName;
86     MCIPROC     lpfnProc;
87 } MCI_WineDesc;
88
89 extern  MCI_WineDesc            MCI_InternalDescriptors[];
90
91 extern LRESULT                  MCI_CleanUp(LRESULT dwRet, UINT wMsg, DWORD dwParam2, BOOL bIs32);
92
93 extern DWORD                    MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD dwParam1, DWORD dwParam2);
94 extern DWORD                    MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, DWORD dwParam2, UINT size);
95
96 LONG                            MCIWAVE_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, 
97                                                    DWORD dwParam1, DWORD dwParam2);
98 LONG                            MCIMIDI_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, 
99                                                    DWORD dwParam1, DWORD dwParam2);
100 LONG                            MCICDAUDIO_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, 
101                                                       DWORD dwParam1, DWORD dwParam2);
102 LONG                            MCIANIM_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, 
103                                                    DWORD dwParam1, DWORD dwParam2);
104 LONG                            MCIAVI_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, 
105                                                   DWORD dwParam1, DWORD dwParam2);
106
107 #endif /* __WINE_MULTIMEDIA_H */