source: trunk/include/win/multimedia.h@ 10367

Last change on this file since 10367 was 4, checked in by ktk, 26 years ago

Import

File size: 4.6 KB
Line 
1/* $Id: multimedia.h,v 1.1 1999-05-24 20:19:15 ktk Exp $ */
2
3/* -*- tab-width: 8; c-basic-offset: 4 -*- */
4
5/*****************************************************************************
6 * Copyright 1998, Luiz Otavio L. Zorzella
7 *
8 * File: multimedia.h
9 * Purpose: multimedia declarations
10 *
11 *****************************************************************************
12 */
13#ifndef __WINE_MULTIMEDIA_H
14#define __WINE_MULTIMEDIA_H
15
16#include "mmsystem.h"
17
18#define MAX_MIDIINDRV (16)
19/* For now I'm making 16 the maximum number of midi devices one can
20 * have. This should be more than enough for everybody. But as a purist,
21 * I intend to make it unbounded in the future, as soon as I figure
22 * a good way to do so.
23 */
24#define MAX_MIDIOUTDRV (16)
25
26#if defined(HAVE_SYS_SOUNDCARD_H)
27# include <sys/soundcard.h>
28#elif defined(HAVE_MACHINE_SOUNDCARD_H)
29# include <machine/soundcard.h>
30#elif defined(HAVE_SOUNDCARD_H)
31# include <soundcard.h>
32#endif
33
34#include <sys/errno.h>
35
36#ifdef HAVE_OSS
37#define MIDI_SEQ "/dev/sequencer"
38#else
39#define MIDI_DEV "/dev/midi"
40#endif
41
42#ifdef SOUND_VERSION
43#define IOCTL(a,b,c) ioctl(a,b,&c)
44#else
45#define IOCTL(a,b,c) (c = ioctl(a,b,c))
46#endif
47
48typedef struct {
49 HDRVR16 hDrv;
50 DRIVERPROC16 driverProc;
51 MCI_OPEN_DRIVER_PARMS16 modp;
52 MCI_OPEN_PARMS16 mop;
53 DWORD dwPrivate;
54 YIELDPROC lpfnYieldProc;
55 DWORD dwYieldData;
56 BOOL bIs32;
57 HTASK16 hCreatorTask;
58} WINE_MCIDRIVER;
59
60extern WINE_MCIDRIVER mciDrv[MAXMCIDRIVERS];
61
62#define WINE_MMTHREAD_CREATED 0x4153494C /* "BSIL" */
63#define WINE_MMTHREAD_DELETED 0xDEADDEAD
64
65typedef struct {
66 DWORD dwSignature; /* 00 "BSIL" when ok, 0xDEADDEAD when being deleted */
67 DWORD dwCounter; /* 04 */
68 HANDLE hThread; /* 08 hThread */
69 DWORD dwThreadId; /* 0C */
70 FARPROC16 fpThread; /* 10 segmented address of thread proc */
71 DWORD dwThreadPmt; /* 14 parameter to be called upon thread creation */
72 DWORD dwUnknown3; /* 18 increment interlocked ? */
73 DWORD hEvent; /* 1C event */
74 DWORD dwUnknown5; /* 20 */
75 DWORD dwStatus; /* 24 0, 10, 20, 30 */
76 DWORD dwFlags; /* 28 dwFlags upon creation */
77 HANDLE16 hTask; /* 2C handle to created task */
78} WINE_MMTHREAD;
79
80#define MCI_GetDrv(wDevID) (&mciDrv[MCI_DevIDToIndex(wDevID)])
81#define MCI_GetOpenDrv(wDevID) (&(MCI_GetDrv(wDevID)->mop))
82
83/* function prototypes */
84extern BOOL MULTIMEDIA_Init(void);
85
86extern int MCI_DevIDToIndex(UINT16 wDevID);
87extern UINT16 MCI_FirstDevID(void);
88extern UINT16 MCI_NextDevID(UINT16 wDevID);
89extern BOOL MCI_DevIDValid(UINT16 wDevID);
90
91extern int MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam);
92extern int MCI_UnMapMsg16To32A(WORD uDevTyp, WORD wMsg, DWORD lParam);
93
94extern DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms);
95extern DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms);
96extern DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSA lpParms);
97
98typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, DWORD, DWORD);
99typedef LONG (*MCIPROC)(DWORD, HDRVR16, DWORD, DWORD, DWORD);
100
101extern WORD MCI_GetDevType(LPCSTR str);
102extern DWORD MCI_WriteString(LPSTR lpDstStr, DWORD dstSize, LPCSTR lpSrcStr);
103extern const char* MCI_CommandToString(UINT16 wMsg);
104
105extern int mciInstalledCount;
106extern int mciInstalledListLen;
107extern LPSTR lpmciInstallNames;
108
109extern UINT16 MCI_DefYieldProc(UINT16 wDevID, DWORD data);
110
111typedef struct {
112 WORD uDevType;
113 char* lpstrName;
114 MCIPROC lpfnProc;
115} MCI_WineDesc;
116
117extern MCI_WineDesc MCI_InternalDescriptors[];
118
119extern LRESULT MCI_CleanUp(LRESULT dwRet, UINT wMsg, DWORD dwParam2, BOOL bIs32);
120
121extern DWORD MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD dwParam1, DWORD dwParam2);
122extern DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, DWORD dwParam2, UINT size);
123
124LONG MCIWAVE_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
125 DWORD dwParam1, DWORD dwParam2);
126LONG MCIMIDI_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
127 DWORD dwParam1, DWORD dwParam2);
128LONG MCICDAUDIO_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
129 DWORD dwParam1, DWORD dwParam2);
130LONG MCIANIM_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
131 DWORD dwParam1, DWORD dwParam2);
132LONG MCIAVI_DriverProc(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
133 DWORD dwParam1, DWORD dwParam2);
134
135#endif /* __WINE_MULTIMEDIA_H */
Note: See TracBrowser for help on using the repository browser.