- better support for ExecuteBuffers
[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 #define MAX_MCIMIDIDRV  (1)
22
23 #if defined(HAVE_SYS_SOUNDCARD_H)
24 # include <sys/soundcard.h>
25 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
26 # include <machine/soundcard.h>
27 #elif defined(HAVE_SOUNDCARD_H)
28 # include <soundcard.h>
29 #endif
30
31 #include <sys/errno.h>
32
33 #ifdef HAVE_OSS
34 #define MIDI_SEQ "/dev/sequencer"
35 #else
36 #define MIDI_DEV "/dev/midi"
37 #endif
38
39 #ifdef SOUND_VERSION
40 #define IOCTL(a,b,c)            ioctl(a,b,&c)
41 #else
42 #define IOCTL(a,b,c)            (c = ioctl(a,b,c))
43 #endif
44
45 struct WINE_MCIDRIVER {
46         HDRVR16                                         hDrv;
47         DRIVERPROC16                            driverProc;
48         MCI_OPEN_DRIVER_PARMS   modp;
49         MCI_OPEN_PARMS16                        mop;
50         DWORD                                                   dwPrivate;
51 };
52
53 /* function prototypes */
54 extern BOOL32 MULTIMEDIA_Init(void);
55
56 extern int              MCI_DevIDToIndex(UINT16 wDevID);
57 extern UINT16           MCI_FirstDevID(void);
58 extern UINT16           MCI_NextDevID(UINT16 wDevID);
59 extern BOOL32           MCI_DevIDValid(UINT16 wDevID);
60
61 extern int              MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam);
62 extern int              MCI_UnMapMsg16To32A(WORD uDevTyp, WORD wMsg, DWORD lParam);
63
64 typedef LONG            (*MCIPROC16)(DWORD, HDRVR16,  WORD, DWORD, DWORD);
65 typedef LONG            (*MCIPROC32)(DWORD, HDRVR16, DWORD, DWORD, DWORD);
66
67 extern MCIPROC32        MCI_GetProc32(UINT16 uDevType);
68 extern WORD                MCI_GetDevType(LPCSTR str);
69 extern DWORD            MCI_WriteString(LPSTR lpDstStr, DWORD dstSize, LPCSTR lpSrcStr);
70 extern const char* MCI_CommandToString(UINT16 wMsg);
71
72
73 extern DWORD MCI_SendCommand32(UINT32 wDevID, UINT16 wMsg, DWORD dwParam1, DWORD dwParam2);
74 extern DWORD MCI_SendCommandAsync32(UINT32 wDevID, UINT32 wMsg, DWORD dwParam1, DWORD dwParam2);
75
76 LONG MCIWAVE_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, 
77                           DWORD dwParam1, DWORD dwParam2);
78 LONG MCIMIDI_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, 
79                           DWORD dwParam1, DWORD dwParam2);
80 LONG MCICDAUDIO_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, 
81                              DWORD dwParam1, DWORD dwParam2);
82 LONG MCIANIM_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg, 
83                           DWORD dwParam1, DWORD dwParam2);
84
85 #endif /* __WINE_MULTIMEDIA_H */