Removed check for union semun; cleaned up a bit.
[wine] / include / msacm.h
1 /*
2  *      msacm.h   -       Declarations for MSACM
3  */
4
5 #ifndef __WINE_MSACM_H
6 #define __WINE_MSACM_H
7
8 #include "windef.h"
9 #include "driver.h"
10 #include "mmsystem.h"
11 #include "mmreg.h"
12
13 /***********************************************************************
14  * Defines/Enums
15  */
16
17 #define ACMERR_BASE        512
18 #define ACMERR_NOTPOSSIBLE (ACMERR_BASE + 0)
19 #define ACMERR_BUSY        (ACMERR_BASE + 1)
20 #define ACMERR_UNPREPARED  (ACMERR_BASE + 2)
21 #define ACMERR_CANCELED    (ACMERR_BASE + 3)
22
23 #define MM_ACM_OPEN  MM_STREAM_OPEN
24 #define MM_ACM_CLOSE MM_STREAM_CLOSE
25 #define MM_ACM_DONE  MM_STREAM_DONE
26
27 #define ACM_DRIVERADDF_FUNCTION   0x00000003L
28 #define ACM_DRIVERADDF_NOTIFYHWND 0x00000004L
29 #define ACM_DRIVERADDF_TYPEMASK   0x00000007L
30 #define ACM_DRIVERADDF_LOCAL      0x00000000L
31 #define ACM_DRIVERADDF_GLOBAL     0x00000008L
32
33 #define ACMDRIVERDETAILS_SHORTNAME_CHARS  32
34 #define ACMDRIVERDETAILS_LONGNAME_CHARS  128
35 #define ACMDRIVERDETAILS_COPYRIGHT_CHARS  80
36 #define ACMDRIVERDETAILS_LICENSING_CHARS 128
37 #define ACMDRIVERDETAILS_FEATURES_CHARS  512
38
39 #define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC mmioFOURCC('a', 'u', 'd', 'c')
40 #define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED  mmioFOURCC('\0', '\0', '\0', '\0')
41
42 #define ACMDRIVERDETAILS_SUPPORTF_CODEC     0x00000001L
43 #define ACMDRIVERDETAILS_SUPPORTF_CONVERTER 0x00000002L
44 #define ACMDRIVERDETAILS_SUPPORTF_FILTER    0x00000004L
45 #define ACMDRIVERDETAILS_SUPPORTF_HARDWARE  0x00000008L
46 #define ACMDRIVERDETAILS_SUPPORTF_ASYNC     0x00000010L
47 #define ACMDRIVERDETAILS_SUPPORTF_LOCAL     0x40000000L
48 #define ACMDRIVERDETAILS_SUPPORTF_DISABLED  0x80000000L
49
50 #define ACM_DRIVERENUMF_NOLOCAL  0x40000000L
51 #define ACM_DRIVERENUMF_DISABLED 0x80000000L
52
53 #define ACM_DRIVERPRIORITYF_ENABLE    0x00000001L
54 #define ACM_DRIVERPRIORITYF_DISABLE   0x00000002L
55 #define ACM_DRIVERPRIORITYF_ABLEMASK  0x00000003L
56 #define ACM_DRIVERPRIORITYF_BEGIN     0x00010000L
57 #define ACM_DRIVERPRIORITYF_END       0x00020000L
58 #define ACM_DRIVERPRIORITYF_DEFERMASK 0x00030000L
59
60 #define MM_ACM_FILTERCHOOSE 0x8000
61
62 #define FILTERCHOOSE_MESSAGE          0
63 #define FILTERCHOOSE_FILTERTAG_VERIFY (FILTERCHOOSE_MESSAGE+0)
64 #define FILTERCHOOSE_FILTER_VERIFY    (FILTERCHOOSE_MESSAGE+1)
65 #define FILTERCHOOSE_CUSTOM_VERIFY    (FILTERCHOOSE_MESSAGE+2)
66
67 #define ACMFILTERCHOOSE_STYLEF_SHOWHELP             0x00000004L
68 #define ACMFILTERCHOOSE_STYLEF_ENABLEHOOK           0x00000008L
69 #define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE       0x00000010L
70 #define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE 0x00000020L
71 #define ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT   0x00000040L
72 #define ACMFILTERCHOOSE_STYLEF_CONTEXTHELP          0x00000080L
73
74 #define ACMFILTERDETAILS_FILTER_CHARS 128
75
76 #define ACM_FILTERDETAILSF_INDEX     0x00000000L
77 #define ACM_FILTERDETAILSF_FILTER    0x00000001L
78 #define ACM_FILTERDETAILSF_QUERYMASK 0x0000000FL
79
80 #define ACMFILTERTAGDETAILS_FILTERTAG_CHARS 48
81
82 #define ACM_FILTERTAGDETAILSF_INDEX       0x00000000L
83 #define ACM_FILTERTAGDETAILSF_FILTERTAG   0x00000001L
84 #define ACM_FILTERTAGDETAILSF_LARGESTSIZE 0x00000002L
85 #define ACM_FILTERTAGDETAILSF_QUERYMASK   0x0000000FL
86
87 #define ACM_FILTERENUMF_DWFILTERTAG 0x00010000L
88
89 #define ACMHELPMSGSTRINGA       "acmchoose_help"
90 #define ACMHELPMSGSTRINGW       L"acmchoose_help"
91 #define ACMHELPMSGSTRING16       "acmchoose_help"
92
93 #define ACMHELPMSGCONTEXTMENUA  "acmchoose_contextmenu"
94 #define ACMHELPMSGCONTEXTMENUW  L"acmchoose_contextmenu"
95 #define ACMHELPMSGCONTEXTMENU16   "acmchoose_contextmenu"
96
97 #define ACMHELPMSGCONTEXTHELPA  "acmchoose_contexthelp"
98 #define ACMHELPMSGCONTEXTHELPW  L"acmchoose_contexthelp"
99 #define ACMHELPMSGCONTEXTHELP16   "acmchoose_contexthelp"
100
101 #define MM_ACM_FORMATCHOOSE 0x8000
102
103 #define FORMATCHOOSE_MESSAGE          0
104 #define FORMATCHOOSE_FORMATTAG_VERIFY (FORMATCHOOSE_MESSAGE+0)
105 #define FORMATCHOOSE_FORMAT_VERIFY    (FORMATCHOOSE_MESSAGE+1)
106 #define FORMATCHOOSE_CUSTOM_VERIFY    (FORMATCHOOSE_MESSAGE+2)
107
108 #define ACMFORMATCHOOSE_STYLEF_SHOWHELP             0x00000004L
109 #define ACMFORMATCHOOSE_STYLEF_ENABLEHOOK           0x00000008L
110 #define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE       0x00000010L
111 #define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE 0x00000020L
112 #define ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT      0x00000040L
113 #define ACMFORMATCHOOSE_STYLEF_CONTEXTHELP          0x00000080L
114
115 #define ACMFORMATDETAILS_FORMAT_CHARS   128
116
117 #define ACM_FORMATDETAILSF_INDEX     0x00000000L
118 #define ACM_FORMATDETAILSF_FORMAT    0x00000001L
119 #define ACM_FORMATDETAILSF_QUERYMASK 0x0000000FL
120
121 #define ACM_FORMATENUMF_WFORMATTAG     0x00010000L
122 #define ACM_FORMATENUMF_NCHANNELS      0x00020000L
123 #define ACM_FORMATENUMF_NSAMPLESPERSEC 0x00040000L
124 #define ACM_FORMATENUMF_WBITSPERSAMPLE 0x00080000L
125 #define ACM_FORMATENUMF_CONVERT        0x00100000L
126 #define ACM_FORMATENUMF_SUGGEST        0x00200000L
127 #define ACM_FORMATENUMF_HARDWARE       0x00400000L
128 #define ACM_FORMATENUMF_INPUT          0x00800000L
129 #define ACM_FORMATENUMF_OUTPUT         0x01000000L
130
131 #define ACM_FORMATSUGGESTF_WFORMATTAG     0x00010000L
132 #define ACM_FORMATSUGGESTF_NCHANNELS      0x00020000L
133 #define ACM_FORMATSUGGESTF_NSAMPLESPERSEC 0x00040000L
134 #define ACM_FORMATSUGGESTF_WBITSPERSAMPLE 0x00080000L
135 #define ACM_FORMATSUGGESTF_TYPEMASK       0x00FF0000L
136
137 #define ACMFORMATTAGDETAILS_FORMATTAG_CHARS 48
138
139 #define ACM_FORMATTAGDETAILSF_INDEX       0x00000000L
140 #define ACM_FORMATTAGDETAILSF_FORMATTAG   0x00000001L
141 #define ACM_FORMATTAGDETAILSF_LARGESTSIZE 0x00000002L
142 #define ACM_FORMATTAGDETAILSF_QUERYMASK   0x0000000FL
143
144 #define ACM_METRIC_COUNT_DRIVERS            1
145 #define ACM_METRIC_COUNT_CODECS             2
146 #define ACM_METRIC_COUNT_CONVERTERS         3
147 #define ACM_METRIC_COUNT_FILTERS            4
148 #define ACM_METRIC_COUNT_DISABLED           5
149 #define ACM_METRIC_COUNT_HARDWARE           6
150 #define ACM_METRIC_COUNT_LOCAL_DRIVERS     20
151 #define ACM_METRIC_COUNT_LOCAL_CODECS      21
152 #define ACM_METRIC_COUNT_LOCAL_CONVERTERS  22
153 #define ACM_METRIC_COUNT_LOCAL_FILTERS     23
154 #define ACM_METRIC_COUNT_LOCAL_DISABLED    24
155 #define ACM_METRIC_HARDWARE_WAVE_INPUT     30
156 #define ACM_METRIC_HARDWARE_WAVE_OUTPUT    31
157 #define ACM_METRIC_MAX_SIZE_FORMAT         50
158 #define ACM_METRIC_MAX_SIZE_FILTER         51
159 #define ACM_METRIC_DRIVER_SUPPORT         100
160 #define ACM_METRIC_DRIVER_PRIORITY        101
161
162 #define ACM_STREAMCONVERTF_BLOCKALIGN 0x00000004
163 #define ACM_STREAMCONVERTF_START      0x00000010
164 #define ACM_STREAMCONVERTF_END        0x00000020
165
166 #define ACMSTREAMHEADER_STATUSF_DONE     0x00010000L
167 #define ACMSTREAMHEADER_STATUSF_PREPARED 0x00020000L
168 #define ACMSTREAMHEADER_STATUSF_INQUEUE  0x00100000L
169
170 #define ACM_STREAMOPENF_QUERY       0x00000001
171 #define ACM_STREAMOPENF_ASYNC       0x00000002
172 #define ACM_STREAMOPENF_NONREALTIME 0x00000004
173
174 #define ACM_STREAMSIZEF_SOURCE      0x00000000L
175 #define ACM_STREAMSIZEF_DESTINATION 0x00000001L
176 #define ACM_STREAMSIZEF_QUERYMASK   0x0000000FL
177
178 #define ACMDM_USER                  (DRV_USER + 0x0000)
179 #define ACMDM_RESERVED_LOW          (DRV_USER + 0x2000)
180 #define ACMDM_RESERVED_HIGH         (DRV_USER + 0x2FFF)
181
182 #define ACMDM_BASE                  ACMDM_RESERVED_LOW
183
184 #define ACMDM_DRIVER_ABOUT          (ACMDM_BASE + 11)
185
186 /***********************************************************************
187  * Callbacks
188  */
189
190 typedef BOOL (CALLBACK *ACMDRIVERENUMCB)(
191   HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport
192 );
193
194 typedef BOOL16 (CALLBACK *ACMDRIVERENUMCB16)(
195   HACMDRIVERID16 hadid, DWORD dwInstance, DWORD fdwSupport
196 );
197
198 typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCA)(
199   HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
200 );
201
202 typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCW)(
203   HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
204 );
205
206 typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROC16)(
207   HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
208 );
209
210 typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCA)(
211   HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
212 );
213
214 typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCW)(
215   HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
216 );
217
218 typedef UINT16 (CALLBACK *ACMFORMATCHOOSEHOOKPROC16)(
219   HWND16 hwnd, UINT16 uMsg, WPARAM16 wParam, LPARAM lParam
220 );
221
222 /***********************************************************************
223  * Structures
224  */
225
226 typedef struct _ACMDRIVERDETAILSA
227 {
228   DWORD    cbStruct;
229
230   FOURCC   fccType;
231   FOURCC   fccComp;
232
233   WORD     wMid;
234   WORD     wPid;
235
236   DWORD    vdwACM;
237   DWORD    vdwDriver;
238
239   DWORD    fdwSupport;
240   DWORD    cFormatTags;
241   DWORD    cFilterTags;
242
243   HICON  hicon;
244
245   CHAR     szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
246   CHAR     szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
247   CHAR     szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
248   CHAR     szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
249   CHAR     szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
250 } ACMDRIVERDETAILSA, *PACMDRIVERDETAILSA;
251
252 typedef struct _ACMDRIVERDETAILSW
253 {
254   DWORD    cbStruct;
255
256   FOURCC   fccType;
257   FOURCC   fccComp;
258
259   WORD     wMid;
260   WORD     wPid;
261
262   DWORD    vdwACM;
263   DWORD    vdwDriver;
264
265   DWORD    fdwSupport;
266   DWORD    cFormatTags;
267   DWORD    cFilterTags;
268
269   HICON  hicon;
270
271   WCHAR    szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
272   WCHAR    szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
273   WCHAR    szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
274   WCHAR    szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
275   WCHAR    szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
276 } ACMDRIVERDETAILSW, *PACMDRIVERDETAILSW;
277
278 typedef struct _ACMDRIVERDETAILS16
279 {
280   DWORD   cbStruct;
281
282   FOURCC  fccType;
283   FOURCC  fccComp;
284
285   WORD    wMid;
286   WORD    wPid;
287
288   DWORD   vdwACM;
289   DWORD   vdwDriver;
290
291   DWORD   fdwSupport;
292   DWORD   cFormatTags;
293   DWORD   cFilterTags;
294
295   HICON16 hicon;
296
297   CHAR    szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
298   CHAR    szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
299   CHAR    szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
300   CHAR    szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
301   CHAR    szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
302 } ACMDRIVERDETAILS16, *NPACMDRIVERDETAILS16, *LPACMDRIVERDETAILS16;
303
304 typedef struct _ACMFILTERCHOOSEA
305 {
306   DWORD         cbStruct;
307   DWORD         fdwStyle;
308
309   HWND        hwndOwner;
310
311   PWAVEFILTER   pwfltr;
312   DWORD         cbwfltr;
313
314   LPCSTR        pszTitle;
315
316   CHAR          szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
317   CHAR          szFilter[ACMFILTERDETAILS_FILTER_CHARS];
318   LPSTR         pszName;
319   DWORD         cchName;
320
321   DWORD         fdwEnum;
322   PWAVEFILTER   pwfltrEnum;
323     
324   HINSTANCE   hInstance;
325   LPCSTR        pszTemplateName;
326   LPARAM        lCustData;
327   ACMFILTERCHOOSEHOOKPROCA pfnHook;
328 } ACMFILTERCHOOSEA, *PACMFILTERCHOOSEA;
329
330 typedef struct _ACMFILTERCHOOSEW
331 {
332   DWORD         cbStruct;
333   DWORD         fdwStyle;
334
335   HWND        hwndOwner;
336
337   PWAVEFILTER   pwfltr;
338   DWORD         cbwfltr;
339
340   LPCWSTR       pszTitle;
341
342   WCHAR         szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
343   WCHAR         szFilter[ACMFILTERDETAILS_FILTER_CHARS];
344   LPWSTR        pszName;
345   DWORD         cchName;
346
347   DWORD         fdwEnum;
348   PWAVEFILTER   pwfltrEnum;
349     
350   HINSTANCE   hInstance;
351   LPCWSTR       pszTemplateName;
352   LPARAM        lCustData;
353   ACMFILTERCHOOSEHOOKPROCW pfnHook;
354 } ACMFILTERCHOOSEW, *PACMFILTERCHOOSEW;
355
356 typedef struct _ACMFILTERCHOOSE16
357 {
358   DWORD          cbStruct;
359   DWORD          fdwStyle;
360
361   HWND16         hwndOwner;
362
363   LPWAVEFILTER   pwfltr;
364   DWORD          cbwfltr;
365
366   LPCSTR         pszTitle;
367
368   char           szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
369   char           szFilter[ACMFILTERDETAILS_FILTER_CHARS];
370   LPSTR          pszName;
371   DWORD          cchName;
372
373   DWORD          fdwEnum;
374   LPWAVEFILTER   pwfltrEnum;
375     
376   HINSTANCE16    hInstance;
377   LPCSTR         pszTemplateName;
378   LPARAM         lCustData;
379   ACMFILTERCHOOSEHOOKPROC16 pfnHook;
380 } ACMFILTERCHOOSE16, *NPACMFILTERCHOOSE16, *LPACMFILTERCHOOSE16;
381
382 typedef struct _ACMFILTERDETAILSA
383 {
384   DWORD           cbStruct;
385   DWORD           dwFilterIndex;
386   DWORD           dwFilterTag;
387   DWORD           fdwSupport;
388   PWAVEFILTER     pwfltr;
389   DWORD           cbwfltr;
390   CHAR            szFilter[ACMFILTERDETAILS_FILTER_CHARS];
391 } ACMFILTERDETAILSA, *PACMFILTERDETAILSA;
392
393 typedef struct _ACMFILTERDETAILSW
394 {
395   DWORD          cbStruct;
396   DWORD          dwFilterIndex;
397   DWORD          dwFilterTag;
398   DWORD          fdwSupport;
399   PWAVEFILTER    pwfltr;
400   DWORD          cbwfltr;
401   WCHAR          szFilter[ACMFILTERDETAILS_FILTER_CHARS];
402 } ACMFILTERDETAILSW, *PACMFILTERDETAILSW;
403
404 typedef struct _ACMFILTERDETAILS16
405 {
406   DWORD          cbStruct;
407   DWORD          dwFilterIndex;
408   DWORD          dwFilterTag;
409   DWORD          fdwSupport;
410   LPWAVEFILTER   pwfltr;
411   DWORD          cbwfltr;
412   CHAR           szFilter[ACMFILTERDETAILS_FILTER_CHARS];
413 } ACMFILTERDETAILS16, *NPACMFILTERDETAILS16, *LPACMFILTERDETAILS16;
414
415 typedef struct _ACMFILTERTAGDETAILSA
416 {
417   DWORD cbStruct;
418   DWORD dwFilterTagIndex;
419   DWORD dwFilterTag;
420   DWORD cbFilterSize;
421   DWORD fdwSupport;
422   DWORD cStandardFilters;
423   CHAR  szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
424 } ACMFILTERTAGDETAILSA, *PACMFILTERTAGDETAILSA;
425
426 typedef struct _ACMFILTERTAGDETAILSW
427 {
428   DWORD cbStruct;
429   DWORD dwFilterTagIndex;
430   DWORD dwFilterTag;
431   DWORD cbFilterSize;
432   DWORD fdwSupport;
433   DWORD cStandardFilters;
434   WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
435 } ACMFILTERTAGDETAILSW, *PACMFILTERTAGDETAILSW;
436
437 typedef struct _ACMFILTERTAGDETAILS16
438 {
439   DWORD cbStruct;
440   DWORD dwFilterTagIndex;
441   DWORD dwFilterTag;
442   DWORD cbFilterSize;
443   DWORD fdwSupport;
444   DWORD cStandardFilters;
445   CHAR  szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
446 } ACMFILTERTAGDETAILS16, *NPACMFILTERTAGDETAILS16, *LPACMFILTERTAGDETAILS16;
447
448 typedef struct _ACMFORMATCHOOSEA
449 {
450   DWORD           cbStruct;
451   DWORD           fdwStyle;
452  
453   HWND          hwndOwner;
454
455   PWAVEFORMATEX   pwfx;
456   DWORD           cbwfx;
457   LPCSTR          pszTitle;
458     
459   CHAR            szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
460   CHAR            szFormat[ACMFORMATDETAILS_FORMAT_CHARS];    
461
462   LPSTR           pszName;
463   DWORD           cchName;
464
465   DWORD           fdwEnum;
466   PWAVEFORMATEX   pwfxEnum;
467     
468   HINSTANCE     hInstance;
469   LPCSTR          pszTemplateName;
470   LPARAM          lCustData;
471   ACMFORMATCHOOSEHOOKPROCA pfnHook;
472 } ACMFORMATCHOOSEA, *PACMFORMATCHOOSEA;
473
474 typedef struct _ACMFORMATCHOOSEW
475 {
476   DWORD           cbStruct;
477   DWORD           fdwStyle;
478     
479   HWND          hwndOwner;
480
481   PWAVEFORMATEX   pwfx;
482   DWORD           cbwfx;
483   LPCWSTR         pszTitle;
484     
485   WCHAR           szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
486   WCHAR           szFormat[ACMFORMATDETAILS_FORMAT_CHARS];    
487
488   LPWSTR          pszName;
489   DWORD           cchName;
490
491   DWORD           fdwEnum;
492   LPWAVEFORMATEX  pwfxEnum;
493     
494   HINSTANCE     hInstance;
495   LPCWSTR         pszTemplateName;
496   LPARAM          lCustData;
497   ACMFORMATCHOOSEHOOKPROCW pfnHook;
498 } ACMFORMATCHOOSEW, *PACMFORMATCHOOSEW;
499
500 typedef struct _ACMFORMATCHOOSE16
501 {
502   DWORD            cbStruct;
503   DWORD            fdwStyle;
504     
505   HWND16           hwndOwner;
506
507   LPWAVEFORMATEX   pwfx;
508   DWORD            cbwfx;
509   LPCSTR           pszTitle;
510     
511   CHAR             szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
512   CHAR             szFormat[ACMFORMATDETAILS_FORMAT_CHARS];    
513
514   LPSTR            pszName;
515   DWORD            cchName;
516
517   DWORD            fdwEnum;
518   LPWAVEFORMATEX   pwfxEnum;
519     
520   HINSTANCE16      hInstance;
521   LPCSTR           pszTemplateName;
522   LPARAM           lCustData;
523   ACMFORMATCHOOSEHOOKPROC16 pfnHook;
524 } ACMFORMATCHOOSE16, *NPACMFORMATCHOOSE16, *LPACMFORMATCHOOSE16;
525
526 typedef struct _ACMFORMATDETAILSA
527 {
528   DWORD           cbStruct;
529   DWORD           dwFormatIndex;
530   DWORD           dwFormatTag;
531   DWORD           fdwSupport;
532   PWAVEFORMATEX   pwfx;
533   DWORD           cbwfx;
534   CHAR            szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
535 } ACMFORMATDETAILSA, *PACMFORMATDETAILSA;
536
537 typedef struct _ACMFORMATDETAILSW
538 {
539     DWORD           cbStruct;
540     DWORD           dwFormatIndex;
541     DWORD           dwFormatTag;
542     DWORD           fdwSupport;
543     PWAVEFORMATEX   pwfx;
544     DWORD           cbwfx;
545     WCHAR           szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
546 } ACMFORMATDETAILSW, *PACMFORMATDETAILSW;
547
548 typedef struct _ACMFORMATDETAILS16
549 {
550     DWORD            cbStruct;
551     DWORD            dwFormatIndex;
552     DWORD            dwFormatTag;
553     DWORD            fdwSupport;
554     LPWAVEFORMATEX   pwfx;
555     DWORD            cbwfx;
556     CHAR             szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
557 } ACMFORMATDETAILS16, *NPACMFORMATDETAILS16, *LPACMFORMATDETAILS16;
558
559 typedef struct _ACMFORMATTAGDETAILSA
560 {
561   DWORD cbStruct;
562   DWORD dwFormatTagIndex;
563   DWORD dwFormatTag;
564   DWORD cbFormatSize;
565   DWORD fdwSupport;
566   DWORD cStandardFormats;
567   CHAR  szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
568 } ACMFORMATTAGDETAILSA, *PACMFORMATTAGDETAILSA;
569
570 typedef struct _ACMFORMATTAGDETAILSW
571 {
572   DWORD cbStruct;
573   DWORD dwFormatTagIndex;
574   DWORD dwFormatTag;
575   DWORD cbFormatSize;
576   DWORD fdwSupport;
577   DWORD cStandardFormats;
578   WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
579 } ACMFORMATTAGDETAILSW, *PACMFORMATTAGDETAILSW;
580
581 typedef struct _ACMFORMATTAGDETAILS16
582 {
583   DWORD cbStruct;
584   DWORD dwFormatTagIndex;
585   DWORD dwFormatTag;
586   DWORD cbFormatSize;
587   DWORD fdwSupport;
588   DWORD cStandardFormats;
589   CHAR  szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
590 } ACMFORMATTAGDETAILS16, *NPACMFORMATTAGDETAILS16, *LPACMFORMATTAGDETAILS16;
591
592 typedef struct _ACMSTREAMHEADER
593 {
594   DWORD  cbStruct;
595   DWORD  fdwStatus;
596   DWORD  dwUser;
597   LPBYTE pbSrc;
598   DWORD  cbSrcLength;
599   DWORD  cbSrcLengthUsed;
600   DWORD  dwSrcUser;
601   LPBYTE pbDst;
602   DWORD  cbDstLength;
603   DWORD  cbDstLengthUsed;
604   DWORD  dwDstUser;
605   DWORD  dwReservedDriver[10];
606 } ACMSTREAMHEADER16, *NPACMSTREAMHEADER16, *LPACMSTREAMHEADER16,
607   ACMSTREAMHEADER, *PACMSTREAMHEADER;
608
609 /***********************************************************************
610  * Callbacks 2
611  */
612
613 typedef BOOL (CALLBACK *ACMFILTERENUMCBA)(
614   HACMDRIVERID hadid, PACMFILTERDETAILSA pafd,
615   DWORD dwInstance, DWORD fdwSupport
616 );
617
618 typedef BOOL (CALLBACK *ACMFILTERENUMCBW)(
619   HACMDRIVERID hadid, PACMFILTERDETAILSW pafd,
620   DWORD dwInstance, DWORD fdwSupport
621 );
622
623 typedef BOOL16 (CALLBACK *ACMFILTERENUMCB16)(
624  HACMDRIVERID16 hadid, LPACMFILTERDETAILS16 pafd,
625  DWORD dwInstance, DWORD fdwSupport
626 );
627
628 typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBA)(
629   HACMDRIVERID hadid, PACMFILTERTAGDETAILSA paftd,
630   DWORD dwInstance, DWORD fdwSupport
631 );
632
633 typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBW)(
634   HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftd,
635   DWORD dwInstance, DWORD fdwSupport
636 );
637
638 typedef BOOL16 (CALLBACK *ACMFILTERTAGENUMCB16)(
639   HACMDRIVERID16 hadid, LPACMFILTERTAGDETAILS16 paftd,
640   DWORD dwInstance, DWORD fdwSupport
641 );
642
643 typedef BOOL (CALLBACK *ACMFORMATENUMCBA)(
644   HACMDRIVERID hadid, PACMFORMATDETAILSA pafd,
645   DWORD dwInstance, DWORD fdwSupport
646 );
647
648 typedef BOOL (CALLBACK *ACMFORMATENUMCBW)(
649   HACMDRIVERID hadid, PACMFORMATDETAILSW pafd,
650   DWORD dwInstance, DWORD fdwSupport
651 );
652
653 typedef BOOL16 (CALLBACK *ACMFORMATENUMCB16)(
654   HACMDRIVERID16 hadid, LPACMFORMATDETAILS16 pafd,
655   DWORD dwInstance, DWORD fdwSupport
656 );
657
658 typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBA)(
659   HACMDRIVERID hadid, PACMFORMATTAGDETAILSA paftd,
660   DWORD dwInstance, DWORD fdwSupport
661 );
662
663 typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBW)(
664   HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftd,
665   DWORD dwInstance, DWORD fdwSupport
666 );
667
668 typedef BOOL16 (CALLBACK *ACMFORMATTAGENUMCB16)(
669   HACMDRIVERID16 hadid, LPACMFORMATTAGDETAILS16 paftd,
670   DWORD dwInstance, DWORD fdwSupport
671 );
672
673 /***********************************************************************
674  * Functions - Win16
675  */
676
677 DWORD WINAPI acmGetVersion16(
678 );
679 MMRESULT16 WINAPI acmMetrics16(
680   HACMOBJ16 hao, UINT16 uMetric, LPVOID pMetric
681 );
682 MMRESULT16 WINAPI acmDriverEnum16(
683   ACMDRIVERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
684 );
685 MMRESULT16 WINAPI acmDriverDetails16(
686   HACMDRIVERID16 hadid, LPACMDRIVERDETAILS16 padd, DWORD fdwDetails
687 );
688 MMRESULT16 WINAPI acmDriverAdd16(
689   LPHACMDRIVERID16 phadid, HINSTANCE16 hinstModule,
690   LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
691 );
692 MMRESULT16 WINAPI acmDriverRemove16(
693   HACMDRIVERID16 hadid, DWORD fdwRemove
694 );
695 MMRESULT16 WINAPI acmDriverOpen16(
696   LPHACMDRIVER16 phad, HACMDRIVERID16 hadid, DWORD fdwOpen
697 );
698 MMRESULT16 WINAPI acmDriverClose16(
699   HACMDRIVER16 had, DWORD fdwClose
700 );
701 LRESULT WINAPI acmDriverMessage16(
702   HACMDRIVER16 had, UINT16 uMsg, LPARAM lParam1, LPARAM lParam2
703 );
704 MMRESULT16 WINAPI acmDriverID16(
705   HACMOBJ16 hao, LPHACMDRIVERID16 phadid, DWORD fdwDriverID
706 );
707 MMRESULT16 WINAPI acmDriverPriority16(
708  HACMDRIVERID16 hadid, DWORD dwPriority, DWORD fdwPriority
709 );
710 MMRESULT16 WINAPI acmFormatTagDetails16(
711   HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd, DWORD fdwDetails
712 );
713 MMRESULT16 WINAPI acmFormatTagEnum16(
714   HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd,
715   ACMFORMATTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
716 );
717 MMRESULT16 WINAPI acmFormatChoose16(
718   LPACMFORMATCHOOSE16 pafmtc
719 );
720 MMRESULT16 WINAPI acmFormatDetails16(
721   HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd, DWORD fdwDetails
722 );
723 MMRESULT16 WINAPI acmFormatEnum16(
724   HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd,
725   ACMFORMATENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
726 );
727 MMRESULT16 WINAPI acmFormatSuggest16(
728   HACMDRIVER16 had, LPWAVEFORMATEX pwfxSrc, 
729   LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest
730 );
731 MMRESULT16 WINAPI acmFilterTagDetails16(
732   HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd, DWORD fdwDetails
733 );
734 MMRESULT16 WINAPI acmFilterTagEnum16(
735   HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd,
736   ACMFILTERTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
737 );
738 MMRESULT16 WINAPI acmFilterChoose16(
739   LPACMFILTERCHOOSE16 pafltrc
740 );
741 MMRESULT16 WINAPI acmFilterDetails16(
742   HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd, DWORD fdwDetails
743 );
744 MMRESULT16 WINAPI acmFilterEnum16(
745   HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd,
746   ACMFILTERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
747 );
748 MMRESULT16 WINAPI acmStreamOpen16(
749   LPHACMSTREAM16 phas, HACMDRIVER16 had,
750   LPWAVEFORMATEX pwfxSrc, LPWAVEFORMATEX pwfxDst,
751   LPWAVEFILTER pwfltr, DWORD dwCallback,
752   DWORD dwInstance, DWORD fdwOpen
753 );
754 MMRESULT16 WINAPI acmStreamClose16(
755   HACMSTREAM16 has, DWORD fdwClose
756 );
757 MMRESULT16 WINAPI acmStreamSize16(
758   HACMSTREAM16 has, DWORD cbInput, 
759   LPDWORD pdwOutputBytes, DWORD fdwSize
760 );
761 MMRESULT16 WINAPI acmStreamConvert16(
762   HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwConvert
763 );
764 MMRESULT16 WINAPI acmStreamReset16(
765   HACMSTREAM16 has, DWORD fdwReset
766 );
767 MMRESULT16 WINAPI acmStreamPrepareHeader16(
768   HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwPrepare
769 );
770 MMRESULT16 WINAPI acmStreamUnprepareHeader16(
771   HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwUnprepare
772 );
773
774 /***********************************************************************
775  * Functions - Win32
776  */
777
778 MMRESULT WINAPI acmDriverAddA(
779   PHACMDRIVERID phadid, HINSTANCE hinstModule,
780   LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
781 );
782 MMRESULT WINAPI acmDriverAddW(
783   PHACMDRIVERID phadid, HINSTANCE hinstModule,
784   LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
785 );
786 MMRESULT WINAPI acmDriverClose(
787   HACMDRIVER had, DWORD fdwClose
788 );
789 MMRESULT WINAPI acmDriverDetailsA(
790   HACMDRIVERID hadid, PACMDRIVERDETAILSA padd, DWORD fdwDetails
791 );
792 MMRESULT WINAPI acmDriverDetailsW(
793   HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails
794 );
795 MMRESULT WINAPI acmDriverEnum(
796   ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum
797 );
798 MMRESULT WINAPI acmDriverID(
799   HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID
800 );
801 LRESULT WINAPI acmDriverMessage(
802   HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2
803 );
804 MMRESULT WINAPI acmDriverOpen(
805   PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen
806 );
807 MMRESULT WINAPI acmDriverPriority(
808   HACMDRIVERID hadid, DWORD dwPriority, DWORD fdwPriority
809 );
810 MMRESULT WINAPI acmDriverRemove(
811   HACMDRIVERID hadid, DWORD fdwRemove
812 );
813 MMRESULT WINAPI acmFilterChooseA(
814   PACMFILTERCHOOSEA pafltrc
815 );
816 MMRESULT WINAPI acmFilterChooseW(
817   PACMFILTERCHOOSEW pafltrc
818 );
819 MMRESULT WINAPI acmFilterDetailsA(
820   HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails
821 );
822 MMRESULT WINAPI acmFilterDetailsW(
823   HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails
824 );
825 MMRESULT WINAPI acmFilterEnumA(
826   HACMDRIVER had, PACMFILTERDETAILSA pafd, 
827   ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
828 );
829 MMRESULT WINAPI acmFilterEnumW(
830   HACMDRIVER had, PACMFILTERDETAILSW pafd, 
831   ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
832 );
833 MMRESULT WINAPI acmFilterTagDetailsA(
834   HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, DWORD fdwDetails
835 );
836 MMRESULT WINAPI acmFilterTagDetailsW(
837   HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails
838 );
839 MMRESULT WINAPI acmFilterTagEnumA(
840   HACMDRIVER had, PACMFILTERTAGDETAILSA paftd,
841   ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
842 );
843 MMRESULT WINAPI acmFilterTagEnumW(
844   HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
845   ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
846 );
847 MMRESULT WINAPI acmFormatChooseA(
848   PACMFORMATCHOOSEA pafmtc
849 );
850 MMRESULT WINAPI acmFormatChooseW(
851   PACMFORMATCHOOSEW pafmtc
852 );
853 MMRESULT WINAPI acmFormatDetailsA(
854   HACMDRIVER had, PACMFORMATDETAILSA pafd, DWORD fdwDetails
855 );
856 MMRESULT WINAPI acmFormatDetailsW(
857   HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails
858 );
859 MMRESULT WINAPI acmFormatEnumA(
860   HACMDRIVER had, PACMFORMATDETAILSA pafd,
861   ACMFORMATENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
862 );
863 MMRESULT WINAPI acmFormatEnumW(
864   HACMDRIVER had, PACMFORMATDETAILSW pafd,
865   ACMFORMATENUMCBW fnCallback, DWORD dwInstance,  DWORD fdwEnum
866 );
867 MMRESULT WINAPI acmFormatSuggest(
868   HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst,
869   DWORD cbwfxDst, DWORD fdwSuggest
870 );
871 MMRESULT WINAPI acmFormatTagDetailsA(
872   HACMDRIVER had, PACMFORMATTAGDETAILSA paftd, DWORD fdwDetails
873 );
874 MMRESULT WINAPI acmFormatTagDetailsW(
875   HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails
876 );
877 MMRESULT WINAPI acmFormatTagEnumA(
878   HACMDRIVER had, PACMFORMATTAGDETAILSA paftd,
879   ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
880 );
881 MMRESULT WINAPI acmFormatTagEnumW(
882   HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
883   ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
884 );
885 DWORD WINAPI acmGetVersion(
886 );
887 MMRESULT WINAPI acmMetrics(
888   HACMOBJ hao, UINT  uMetric, LPVOID  pMetric
889 );
890 MMRESULT WINAPI acmStreamClose(
891   HACMSTREAM has, DWORD fdwClose
892 );
893 MMRESULT WINAPI acmStreamConvert(
894   HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwConvert
895 );
896 MMRESULT WINAPI acmStreamMessage(
897   HACMSTREAM has, UINT uMsg, LPARAM lParam1, LPARAM lParam2
898 );
899 MMRESULT WINAPI acmStreamOpen(
900   PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
901   PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD dwCallback,
902   DWORD dwInstance, DWORD fdwOpen
903 );
904 MMRESULT WINAPI acmStreamPrepareHeader(
905   HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare
906 );
907 MMRESULT WINAPI acmStreamReset(
908   HACMSTREAM has, DWORD fdwReset
909 );
910 MMRESULT WINAPI acmStreamSize(
911   HACMSTREAM has, DWORD cbInput, 
912   LPDWORD pdwOutputBytes, DWORD fdwSize
913 );
914 MMRESULT WINAPI acmStreamUnprepareHeader(
915   HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare
916 );
917
918 /***********************************************************************
919  * Wine specific - Win32
920  */
921 typedef struct _WINE_ACMBUILTINDRIVER
922 {
923   LPSTR        pszDriverAlias;
924   DRIVERPROC pfnDriverProc;
925 } WINE_ACMBUILTINDRIVER, *PWINE_ACMBUILTINDRIVER;
926
927 typedef struct _WINE_ACMLOCALDRIVER
928 {
929   DRIVERPROC pfnDriverProc;
930 } WINE_ACMLOCALDRIVER, *PWINE_ACMLOCALDRIVER;
931
932 typedef struct _WINE_ACMDRIVERID *PWINE_ACMDRIVERID;
933
934 typedef struct _WINE_ACMOBJ
935 {
936   PWINE_ACMDRIVERID pACMDriverID;
937 } WINE_ACMOBJ, *PWINE_ACMOBJ;
938
939 typedef struct _WINE_ACMDRIVER
940 {
941   WINE_ACMOBJ  obj;
942   HDRVR        hDrvr;
943 } WINE_ACMDRIVER, *PWINE_ACMDRIVER;
944
945 typedef struct _WINE_ACMSTREAM
946 {
947   WINE_ACMOBJ  obj;
948   /* FIME: More fields needed */
949 } WINE_ACMSTREAM, *PWINE_ACMSTREAM;
950
951 typedef struct _WINE_ACMDRIVERID
952 {
953   LPSTR                    pszDriverAlias;
954   LPSTR                    pszFileName;
955   PWINE_ACMLOCALDRIVER   pACMLocalDriver;
956   BOOL                   bEnabled;
957   PWINE_ACMDRIVER        pACMDriver;           /* NULL if not open */
958   PWINE_ACMDRIVERID      pNextACMDriverID;
959   PWINE_ACMDRIVERID      pPreviousACMDriverID;
960 } WINE_ACMDRIVERID;
961
962 /* From builtin.c */
963 extern WINE_ACMBUILTINDRIVER MSACM_BuiltinDrivers[];
964
965 /* From interal.c */
966 extern HANDLE MSACM_hHeap;
967 extern PWINE_ACMDRIVERID MSACM_pFirstACMDriverID;
968 extern PWINE_ACMDRIVERID MSACM_pLastACMDriverID;
969 PWINE_ACMDRIVERID MSACM_RegisterDriver(
970   LPSTR pszDriverAlias, LPSTR pszFileName,
971   PWINE_ACMLOCALDRIVER pLocalDriver);
972 void MSACM_RegisterAllDrivers();
973 PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p);
974 void MSACM_UnregisterAllDrivers();
975 PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID);
976 PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver);
977 PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj);
978 HDRVR MSACM_OpenDriverProc(DRIVERPROC pfnDriverProc);
979
980 #endif  /* __WINE_MSACM_H */
981
982