Fixed atom test to work on Windows.
[wine] / include / msacm.h
1 /*
2  * Declarations for MSACM
3  *
4  * Copyright (C) the Wine project
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_MSACM_H
22 #define __WINE_MSACM_H
23
24 #include "windef.h"
25 #include "mmsystem.h"
26 #include "mmreg.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* defined(__cplusplus) */
31
32 #define ACMAPI              WINAPI
33
34 /***********************************************************************
35  * Defines/Enums
36  */
37 #define ACMERR_BASE        512
38 #define ACMERR_NOTPOSSIBLE (ACMERR_BASE + 0)
39 #define ACMERR_BUSY        (ACMERR_BASE + 1)
40 #define ACMERR_UNPREPARED  (ACMERR_BASE + 2)
41 #define ACMERR_CANCELED    (ACMERR_BASE + 3)
42
43 #define MM_ACM_OPEN  MM_STREAM_OPEN
44 #define MM_ACM_CLOSE MM_STREAM_CLOSE
45 #define MM_ACM_DONE  MM_STREAM_DONE
46
47 #define ACM_DRIVERADDF_FUNCTION   0x00000003L
48 #define ACM_DRIVERADDF_NOTIFYHWND 0x00000004L
49 #define ACM_DRIVERADDF_TYPEMASK   0x00000007L
50 #define ACM_DRIVERADDF_LOCAL      0x00000000L
51 #define ACM_DRIVERADDF_GLOBAL     0x00000008L
52
53 #define ACMDRIVERDETAILS_SHORTNAME_CHARS  32
54 #define ACMDRIVERDETAILS_LONGNAME_CHARS  128
55 #define ACMDRIVERDETAILS_COPYRIGHT_CHARS  80
56 #define ACMDRIVERDETAILS_LICENSING_CHARS 128
57 #define ACMDRIVERDETAILS_FEATURES_CHARS  512
58
59 #define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC mmioFOURCC('a', 'u', 'd', 'c')
60 #define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED  mmioFOURCC('\0', '\0', '\0', '\0')
61
62 #define ACMDRIVERDETAILS_SUPPORTF_CODEC     0x00000001L
63 #define ACMDRIVERDETAILS_SUPPORTF_CONVERTER 0x00000002L
64 #define ACMDRIVERDETAILS_SUPPORTF_FILTER    0x00000004L
65 #define ACMDRIVERDETAILS_SUPPORTF_HARDWARE  0x00000008L
66 #define ACMDRIVERDETAILS_SUPPORTF_ASYNC     0x00000010L
67 #define ACMDRIVERDETAILS_SUPPORTF_LOCAL     0x40000000L
68 #define ACMDRIVERDETAILS_SUPPORTF_DISABLED  0x80000000L
69
70 #define ACM_DRIVERENUMF_NOLOCAL  0x40000000L
71 #define ACM_DRIVERENUMF_DISABLED 0x80000000L
72
73 #define ACM_DRIVERPRIORITYF_ENABLE    0x00000001L
74 #define ACM_DRIVERPRIORITYF_DISABLE   0x00000002L
75 #define ACM_DRIVERPRIORITYF_ABLEMASK  0x00000003L
76 #define ACM_DRIVERPRIORITYF_BEGIN     0x00010000L
77 #define ACM_DRIVERPRIORITYF_END       0x00020000L
78 #define ACM_DRIVERPRIORITYF_DEFERMASK 0x00030000L
79
80 #define MM_ACM_FILTERCHOOSE 0x8000
81
82 #define FILTERCHOOSE_MESSAGE          0
83 #define FILTERCHOOSE_FILTERTAG_VERIFY (FILTERCHOOSE_MESSAGE+0)
84 #define FILTERCHOOSE_FILTER_VERIFY    (FILTERCHOOSE_MESSAGE+1)
85 #define FILTERCHOOSE_CUSTOM_VERIFY    (FILTERCHOOSE_MESSAGE+2)
86
87 #define ACMFILTERCHOOSE_STYLEF_SHOWHELP             0x00000004L
88 #define ACMFILTERCHOOSE_STYLEF_ENABLEHOOK           0x00000008L
89 #define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE       0x00000010L
90 #define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE 0x00000020L
91 #define ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT   0x00000040L
92 #define ACMFILTERCHOOSE_STYLEF_CONTEXTHELP          0x00000080L
93
94 #define ACMFILTERDETAILS_FILTER_CHARS 128
95
96 #define ACM_FILTERDETAILSF_INDEX     0x00000000L
97 #define ACM_FILTERDETAILSF_FILTER    0x00000001L
98 #define ACM_FILTERDETAILSF_QUERYMASK 0x0000000FL
99
100 #define ACMFILTERTAGDETAILS_FILTERTAG_CHARS 48
101
102 #define ACM_FILTERTAGDETAILSF_INDEX       0x00000000L
103 #define ACM_FILTERTAGDETAILSF_FILTERTAG   0x00000001L
104 #define ACM_FILTERTAGDETAILSF_LARGESTSIZE 0x00000002L
105 #define ACM_FILTERTAGDETAILSF_QUERYMASK   0x0000000FL
106
107 #define ACM_FILTERENUMF_DWFILTERTAG 0x00010000L
108
109 #define ACMHELPMSGSTRINGA       "acmchoose_help"
110 #if defined(__GNUC__)
111 # define ACMHELPMSGSTRINGW (const WCHAR []){ 'a','c','m', \
112   'c','h','o','o','s','e','_','h','e','l','p',0 }
113 #elif defined(_MSC_VER)
114 # define ACMHELPMSGSTRINGW      L"acmchoose_help"
115 #else
116 static const WCHAR ACMHELPMSGSTRINGW[] = { 'a','c','m',
117   'c','h','o','o','s','e','_','h','e','l','p',0 };
118 #endif
119 #define ACMHELPMSGSTRING WINELIB_NAME_AW(ACMHELPMSGSTRING)
120
121 #define ACMHELPMSGCONTEXTMENUA  "acmchoose_contextmenu"
122 #if defined(__GNUC__)
123 # define ACMHELPMSGCONTEXTMENUW (const WCHAR []){ 'a','c','m', \
124   'c','h','o','o','s','e','_','c','o','n','t','e','x','t','m','e','n','u',0 }
125 #elif defined(_MSC_VER)
126 # define ACMHELPMSGCONTEXTMENUW L"acmchoose_contextmenu"
127 #else
128 static const WCHAR ACMHELPMSGCONTEXTMENUW[] = { 'a','c','m',
129   'c','h','o','o','s','e','_','c','o','n','t','e','x','t','m','e','n','u',0 };
130 #endif
131 #define ACMHELPMSGCONTEXTMENU WINELIB_NAME_AW(ACMHELPMSGCONTEXTMENU)
132
133 #define ACMHELPMSGCONTEXTHELPA  "acmchoose_contexthelp"
134 #if defined(__GNUC__)
135 # define ACMHELPMSGCONTEXTHELPW (const WCHAR []){ 'a','c','m', \
136   'c','h','o','o','s','e','_','c','o','n','t','e','x','t','h','e','l','p',0 }
137 #elif defined(_MSC_VER)
138 # define ACMHELPMSGCONTEXTHELPW L"acmchoose_contexthelp"
139 #else
140 static const WCHAR ACMHELPMSGCONTEXTHELPW[] = { 'a','c','m',
141   'c','h','o','o','s','e','_','c','o','n','t','e','x','t','h','e','l','p',0 };
142 #endif
143 #define ACMHELPMSGCONTEXTHELP WINELIB_NAME_AW(ACMHELPMSGCONTEXTHELP)
144
145 #define MM_ACM_FORMATCHOOSE 0x8000
146
147 #define FORMATCHOOSE_MESSAGE          0
148 #define FORMATCHOOSE_FORMATTAG_VERIFY (FORMATCHOOSE_MESSAGE+0)
149 #define FORMATCHOOSE_FORMAT_VERIFY    (FORMATCHOOSE_MESSAGE+1)
150 #define FORMATCHOOSE_CUSTOM_VERIFY    (FORMATCHOOSE_MESSAGE+2)
151
152 #define ACMFORMATCHOOSE_STYLEF_SHOWHELP             0x00000004L
153 #define ACMFORMATCHOOSE_STYLEF_ENABLEHOOK           0x00000008L
154 #define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE       0x00000010L
155 #define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE 0x00000020L
156 #define ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT      0x00000040L
157 #define ACMFORMATCHOOSE_STYLEF_CONTEXTHELP          0x00000080L
158
159 #define ACMFORMATDETAILS_FORMAT_CHARS   128
160
161 #define ACM_FORMATDETAILSF_INDEX     0x00000000L
162 #define ACM_FORMATDETAILSF_FORMAT    0x00000001L
163 #define ACM_FORMATDETAILSF_QUERYMASK 0x0000000FL
164
165 #define ACM_FORMATENUMF_WFORMATTAG     0x00010000L
166 #define ACM_FORMATENUMF_NCHANNELS      0x00020000L
167 #define ACM_FORMATENUMF_NSAMPLESPERSEC 0x00040000L
168 #define ACM_FORMATENUMF_WBITSPERSAMPLE 0x00080000L
169 #define ACM_FORMATENUMF_CONVERT        0x00100000L
170 #define ACM_FORMATENUMF_SUGGEST        0x00200000L
171 #define ACM_FORMATENUMF_HARDWARE       0x00400000L
172 #define ACM_FORMATENUMF_INPUT          0x00800000L
173 #define ACM_FORMATENUMF_OUTPUT         0x01000000L
174
175 #define ACM_FORMATSUGGESTF_WFORMATTAG     0x00010000L
176 #define ACM_FORMATSUGGESTF_NCHANNELS      0x00020000L
177 #define ACM_FORMATSUGGESTF_NSAMPLESPERSEC 0x00040000L
178 #define ACM_FORMATSUGGESTF_WBITSPERSAMPLE 0x00080000L
179 #define ACM_FORMATSUGGESTF_TYPEMASK       0x00FF0000L
180
181 #define ACMFORMATTAGDETAILS_FORMATTAG_CHARS 48
182
183 #define ACM_FORMATTAGDETAILSF_INDEX       0x00000000L
184 #define ACM_FORMATTAGDETAILSF_FORMATTAG   0x00000001L
185 #define ACM_FORMATTAGDETAILSF_LARGESTSIZE 0x00000002L
186 #define ACM_FORMATTAGDETAILSF_QUERYMASK   0x0000000FL
187
188 #define ACM_METRIC_COUNT_DRIVERS            1
189 #define ACM_METRIC_COUNT_CODECS             2
190 #define ACM_METRIC_COUNT_CONVERTERS         3
191 #define ACM_METRIC_COUNT_FILTERS            4
192 #define ACM_METRIC_COUNT_DISABLED           5
193 #define ACM_METRIC_COUNT_HARDWARE           6
194 #define ACM_METRIC_COUNT_LOCAL_DRIVERS     20
195 #define ACM_METRIC_COUNT_LOCAL_CODECS      21
196 #define ACM_METRIC_COUNT_LOCAL_CONVERTERS  22
197 #define ACM_METRIC_COUNT_LOCAL_FILTERS     23
198 #define ACM_METRIC_COUNT_LOCAL_DISABLED    24
199 #define ACM_METRIC_HARDWARE_WAVE_INPUT     30
200 #define ACM_METRIC_HARDWARE_WAVE_OUTPUT    31
201 #define ACM_METRIC_MAX_SIZE_FORMAT         50
202 #define ACM_METRIC_MAX_SIZE_FILTER         51
203 #define ACM_METRIC_DRIVER_SUPPORT         100
204 #define ACM_METRIC_DRIVER_PRIORITY        101
205
206 #define ACM_STREAMCONVERTF_BLOCKALIGN 0x00000004
207 #define ACM_STREAMCONVERTF_START      0x00000010
208 #define ACM_STREAMCONVERTF_END        0x00000020
209
210 #define ACMSTREAMHEADER_STATUSF_DONE     0x00010000L
211 #define ACMSTREAMHEADER_STATUSF_PREPARED 0x00020000L
212 #define ACMSTREAMHEADER_STATUSF_INQUEUE  0x00100000L
213
214 #define ACM_STREAMOPENF_QUERY       0x00000001
215 #define ACM_STREAMOPENF_ASYNC       0x00000002
216 #define ACM_STREAMOPENF_NONREALTIME 0x00000004
217
218 #define ACM_STREAMSIZEF_SOURCE      0x00000000L
219 #define ACM_STREAMSIZEF_DESTINATION 0x00000001L
220 #define ACM_STREAMSIZEF_QUERYMASK   0x0000000FL
221
222 #define ACMDM_USER                  (DRV_USER + 0x0000)
223 #define ACMDM_RESERVED_LOW          (DRV_USER + 0x2000)
224 #define ACMDM_RESERVED_HIGH         (DRV_USER + 0x2FFF)
225
226 #define ACMDM_BASE                  ACMDM_RESERVED_LOW
227
228 #define ACMDM_DRIVER_ABOUT          (ACMDM_BASE + 11)
229
230 /* handles */
231
232 DECLARE_HANDLE(HACMDRIVERID);
233 DECLARE_HANDLE(HACMDRIVER);
234 DECLARE_HANDLE(HACMSTREAM);
235 DECLARE_HANDLE(HACMOBJ);
236
237 /***********************************************************************
238  * Callbacks
239  */
240
241 typedef BOOL (CALLBACK *ACMDRIVERENUMCB)(
242   HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport
243 );
244
245 typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCA)(
246   HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
247 );
248
249 typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCW)(
250   HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
251 );
252 #define ACMFILTERCHOOSEHOOKPROC WINELIB_NAME_AW(ACMFILTERCHOOSEHOOKPROC)
253
254 typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCA)(
255   HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
256 );
257
258 typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCW)(
259   HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
260 );
261 #define ACMFORMATCHOOSEHOOKPROC WINELIB_NAME_AW(ACMFORMATCHOOSEHOOKPROC)
262
263 /***********************************************************************
264  * Structures
265  */
266
267 typedef struct _ACMDRIVERDETAILSA
268 {
269   DWORD    cbStruct;
270
271   FOURCC   fccType;
272   FOURCC   fccComp;
273
274   WORD     wMid;
275   WORD     wPid;
276
277   DWORD    vdwACM;
278   DWORD    vdwDriver;
279
280   DWORD    fdwSupport;
281   DWORD    cFormatTags;
282   DWORD    cFilterTags;
283
284   HICON  hicon;
285
286   CHAR     szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
287   CHAR     szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
288   CHAR     szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
289   CHAR     szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
290   CHAR     szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
291 } ACMDRIVERDETAILSA, *PACMDRIVERDETAILSA, *LPACMDRIVERDETAILSA;
292
293 typedef struct _ACMDRIVERDETAILSW
294 {
295   DWORD    cbStruct;
296
297   FOURCC   fccType;
298   FOURCC   fccComp;
299
300   WORD     wMid;
301   WORD     wPid;
302
303   DWORD    vdwACM;
304   DWORD    vdwDriver;
305
306   DWORD    fdwSupport;
307   DWORD    cFormatTags;
308   DWORD    cFilterTags;
309
310   HICON  hicon;
311
312   WCHAR    szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
313   WCHAR    szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
314   WCHAR    szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
315   WCHAR    szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
316   WCHAR    szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
317 } ACMDRIVERDETAILSW, *PACMDRIVERDETAILSW, *LPACMDRIVERDETAILSW;
318
319 DECL_WINELIB_TYPE_AW(ACMDRIVERDETAILS)
320 DECL_WINELIB_TYPE_AW(PACMDRIVERDETAILS)
321 DECL_WINELIB_TYPE_AW(LPACMDRIVERDETAILS)
322
323 typedef struct _ACMFILTERCHOOSEA
324 {
325   DWORD         cbStruct;
326   DWORD         fdwStyle;
327
328   HWND        hwndOwner;
329
330   PWAVEFILTER   pwfltr;
331   DWORD         cbwfltr;
332
333   LPCSTR        pszTitle;
334
335   CHAR          szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
336   CHAR          szFilter[ACMFILTERDETAILS_FILTER_CHARS];
337   LPSTR         pszName;
338   DWORD         cchName;
339
340   DWORD         fdwEnum;
341   PWAVEFILTER   pwfltrEnum;
342
343   HINSTANCE   hInstance;
344   LPCSTR        pszTemplateName;
345   LPARAM        lCustData;
346   ACMFILTERCHOOSEHOOKPROCA pfnHook;
347 } ACMFILTERCHOOSEA, *PACMFILTERCHOOSEA, *LPACMFILTERCHOOSEA;
348
349 typedef struct _ACMFILTERCHOOSEW
350 {
351   DWORD         cbStruct;
352   DWORD         fdwStyle;
353
354   HWND        hwndOwner;
355
356   PWAVEFILTER   pwfltr;
357   DWORD         cbwfltr;
358
359   LPCWSTR       pszTitle;
360
361   WCHAR         szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
362   WCHAR         szFilter[ACMFILTERDETAILS_FILTER_CHARS];
363   LPWSTR        pszName;
364   DWORD         cchName;
365
366   DWORD         fdwEnum;
367   PWAVEFILTER   pwfltrEnum;
368
369   HINSTANCE   hInstance;
370   LPCWSTR       pszTemplateName;
371   LPARAM        lCustData;
372   ACMFILTERCHOOSEHOOKPROCW pfnHook;
373 } ACMFILTERCHOOSEW, *PACMFILTERCHOOSEW, *LPACMFILTERCHOOSEW;
374
375 DECL_WINELIB_TYPE_AW(ACMFILTERCHOOSE)
376 DECL_WINELIB_TYPE_AW(PACMFILTERCHOOSE)
377 DECL_WINELIB_TYPE_AW(LPACMFILTERCHOOSE)
378
379 typedef struct _ACMFILTERDETAILSA
380 {
381   DWORD           cbStruct;
382   DWORD           dwFilterIndex;
383   DWORD           dwFilterTag;
384   DWORD           fdwSupport;
385   PWAVEFILTER     pwfltr;
386   DWORD           cbwfltr;
387   CHAR            szFilter[ACMFILTERDETAILS_FILTER_CHARS];
388 } ACMFILTERDETAILSA, *PACMFILTERDETAILSA, *LPACMFILTERDETAILSA;
389
390 typedef struct _ACMFILTERDETAILSW
391 {
392   DWORD          cbStruct;
393   DWORD          dwFilterIndex;
394   DWORD          dwFilterTag;
395   DWORD          fdwSupport;
396   PWAVEFILTER    pwfltr;
397   DWORD          cbwfltr;
398   WCHAR          szFilter[ACMFILTERDETAILS_FILTER_CHARS];
399 } ACMFILTERDETAILSW, *PACMFILTERDETAILSW, *LPACMFILTERDETAILSW;
400
401 DECL_WINELIB_TYPE_AW(ACMFILTERDETAILS)
402 DECL_WINELIB_TYPE_AW(PACMFILTERDETAILS)
403 DECL_WINELIB_TYPE_AW(LPACMFILTERDETAILS)
404
405 typedef struct _ACMFILTERTAGDETAILSA
406 {
407   DWORD cbStruct;
408   DWORD dwFilterTagIndex;
409   DWORD dwFilterTag;
410   DWORD cbFilterSize;
411   DWORD fdwSupport;
412   DWORD cStandardFilters;
413   CHAR  szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
414 } ACMFILTERTAGDETAILSA, *PACMFILTERTAGDETAILSA, *LPACMFILTERTAGDETAILSA;
415
416 typedef struct _ACMFILTERTAGDETAILSW
417 {
418   DWORD cbStruct;
419   DWORD dwFilterTagIndex;
420   DWORD dwFilterTag;
421   DWORD cbFilterSize;
422   DWORD fdwSupport;
423   DWORD cStandardFilters;
424   WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
425 } ACMFILTERTAGDETAILSW, *PACMFILTERTAGDETAILSW, *LPACMFILTERTAGDETAILSW;
426
427 DECL_WINELIB_TYPE_AW(ACMFILTERTAGDETAILS)
428 DECL_WINELIB_TYPE_AW(PACMFILTERTAGDETAILS)
429 DECL_WINELIB_TYPE_AW(LPACMFILTERTAGDETAILS)
430
431 typedef struct _ACMFORMATCHOOSEA
432 {
433   DWORD           cbStruct;
434   DWORD           fdwStyle;
435
436   HWND          hwndOwner;
437
438   PWAVEFORMATEX   pwfx;
439   DWORD           cbwfx;
440   LPCSTR          pszTitle;
441
442   CHAR            szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
443   CHAR            szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
444
445   LPSTR           pszName;
446   DWORD           cchName;
447
448   DWORD           fdwEnum;
449   PWAVEFORMATEX   pwfxEnum;
450
451   HINSTANCE     hInstance;
452   LPCSTR          pszTemplateName;
453   LPARAM          lCustData;
454   ACMFORMATCHOOSEHOOKPROCA pfnHook;
455 } ACMFORMATCHOOSEA, *PACMFORMATCHOOSEA, *LPACMFORMATCHOOSEA;
456
457 typedef struct _ACMFORMATCHOOSEW
458 {
459   DWORD           cbStruct;
460   DWORD           fdwStyle;
461
462   HWND          hwndOwner;
463
464   PWAVEFORMATEX   pwfx;
465   DWORD           cbwfx;
466   LPCWSTR         pszTitle;
467
468   WCHAR           szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
469   WCHAR           szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
470
471   LPWSTR          pszName;
472   DWORD           cchName;
473
474   DWORD           fdwEnum;
475   LPWAVEFORMATEX  pwfxEnum;
476
477   HINSTANCE     hInstance;
478   LPCWSTR         pszTemplateName;
479   LPARAM          lCustData;
480   ACMFORMATCHOOSEHOOKPROCW pfnHook;
481 } ACMFORMATCHOOSEW, *PACMFORMATCHOOSEW, *LPACMFORMATCHOOSEW;
482
483 DECL_WINELIB_TYPE_AW(ACMFORMATCHOOSE)
484 DECL_WINELIB_TYPE_AW(PACMFORMATCHOOSE)
485 DECL_WINELIB_TYPE_AW(LPACMFORMATCHOOSE)
486
487 typedef struct _ACMFORMATDETAILSA
488 {
489   DWORD           cbStruct;
490   DWORD           dwFormatIndex;
491   DWORD           dwFormatTag;
492   DWORD           fdwSupport;
493   PWAVEFORMATEX   pwfx;
494   DWORD           cbwfx;
495   CHAR            szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
496 } ACMFORMATDETAILSA, *PACMFORMATDETAILSA, *LPACMFORMATDETAILSA;
497
498 typedef struct _ACMFORMATDETAILSW
499 {
500     DWORD           cbStruct;
501     DWORD           dwFormatIndex;
502     DWORD           dwFormatTag;
503     DWORD           fdwSupport;
504     PWAVEFORMATEX   pwfx;
505     DWORD           cbwfx;
506     WCHAR           szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
507 } ACMFORMATDETAILSW, *PACMFORMATDETAILSW, *LPACMFORMATDETAILSW;
508
509 DECL_WINELIB_TYPE_AW(ACMFORMATDETAILS)
510 DECL_WINELIB_TYPE_AW(PACMFORMATDETAILS)
511 DECL_WINELIB_TYPE_AW(LPACMFORMATDETAILS)
512
513 typedef struct _ACMFORMATTAGDETAILSA
514 {
515   DWORD cbStruct;
516   DWORD dwFormatTagIndex;
517   DWORD dwFormatTag;
518   DWORD cbFormatSize;
519   DWORD fdwSupport;
520   DWORD cStandardFormats;
521   CHAR  szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
522 } ACMFORMATTAGDETAILSA, *PACMFORMATTAGDETAILSA, *LPACMFORMATTAGDETAILSA;
523
524 typedef struct _ACMFORMATTAGDETAILSW
525 {
526   DWORD cbStruct;
527   DWORD dwFormatTagIndex;
528   DWORD dwFormatTag;
529   DWORD cbFormatSize;
530   DWORD fdwSupport;
531   DWORD cStandardFormats;
532   WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
533 } ACMFORMATTAGDETAILSW, *PACMFORMATTAGDETAILSW, *LPACMFORMATTAGDETAILSW;
534
535 DECL_WINELIB_TYPE_AW(ACMFORMATTAGDETAILS)
536 DECL_WINELIB_TYPE_AW(PACMFORMATTAGDETAILS)
537 DECL_WINELIB_TYPE_AW(LPACMFORMATTAGDETAILS)
538
539 typedef struct _ACMSTREAMHEADER
540 {
541   DWORD  cbStruct;
542   DWORD  fdwStatus;
543   DWORD  dwUser;
544   LPBYTE pbSrc;
545   DWORD  cbSrcLength;
546   DWORD  cbSrcLengthUsed;
547   DWORD  dwSrcUser;
548   LPBYTE pbDst;
549   DWORD  cbDstLength;
550   DWORD  cbDstLengthUsed;
551   DWORD  dwDstUser;
552   DWORD  dwReservedDriver[10];
553 } ACMSTREAMHEADER, *PACMSTREAMHEADER, *LPACMSTREAMHEADER;
554
555 /***********************************************************************
556  * Callbacks 2
557  */
558
559 typedef BOOL (CALLBACK *ACMFILTERENUMCBA)(
560   HACMDRIVERID hadid, PACMFILTERDETAILSA pafd,
561   DWORD dwInstance, DWORD fdwSupport
562 );
563
564 typedef BOOL (CALLBACK *ACMFILTERENUMCBW)(
565   HACMDRIVERID hadid, PACMFILTERDETAILSW pafd,
566   DWORD dwInstance, DWORD fdwSupport
567 );
568
569 #define ACMFILTERENUMCB WINELIB_NAME_AW(ACMFILTERENUMCB)
570
571 typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBA)(
572   HACMDRIVERID hadid, PACMFILTERTAGDETAILSA paftd,
573   DWORD dwInstance, DWORD fdwSupport
574 );
575
576 typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBW)(
577   HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftd,
578   DWORD dwInstance, DWORD fdwSupport
579 );
580
581 #define ACMFILTERTAGENUMCB WINELIB_NAME_AW(ACMFILTERTAGENUMCB)
582
583 typedef BOOL (CALLBACK *ACMFORMATENUMCBA)(
584   HACMDRIVERID hadid, PACMFORMATDETAILSA pafd,
585   DWORD dwInstance, DWORD fdwSupport
586 );
587
588 typedef BOOL (CALLBACK *ACMFORMATENUMCBW)(
589   HACMDRIVERID hadid, PACMFORMATDETAILSW pafd,
590   DWORD dwInstance, DWORD fdwSupport
591 );
592
593 #define ACMFORMATENUMCB WINELIB_NAME_AW(ACMFORMATENUMCB)
594
595 typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBA)(
596   HACMDRIVERID hadid, PACMFORMATTAGDETAILSA paftd,
597   DWORD dwInstance, DWORD fdwSupport
598 );
599
600 typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBW)(
601   HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftd,
602   DWORD dwInstance, DWORD fdwSupport
603 );
604
605 #define ACMFORMATTAGENUMCB WINELIB_NAME_AW(ACMFORMATTAGENUMCB)
606
607 /***********************************************************************
608  * Functions - Win32
609  */
610
611 MMRESULT WINAPI acmDriverAddA(
612   PHACMDRIVERID phadid, HINSTANCE hinstModule,
613   LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
614 );
615 MMRESULT WINAPI acmDriverAddW(
616   PHACMDRIVERID phadid, HINSTANCE hinstModule,
617   LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
618 );
619 #define acmDriverAdd WINELIB_NAME_AW(acmDriverAdd)
620
621 MMRESULT WINAPI acmDriverClose(
622   HACMDRIVER had, DWORD fdwClose
623 );
624 MMRESULT WINAPI acmDriverDetailsA(
625   HACMDRIVERID hadid, PACMDRIVERDETAILSA padd, DWORD fdwDetails
626 );
627 MMRESULT WINAPI acmDriverDetailsW(
628   HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails
629 );
630 #define acmDriverDetails WINELIB_NAME_AW(acmDriverDetails)
631
632 MMRESULT WINAPI acmDriverEnum(
633   ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum
634 );
635 MMRESULT WINAPI acmDriverID(
636   HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID
637 );
638 LRESULT WINAPI acmDriverMessage(
639   HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2
640 );
641 MMRESULT WINAPI acmDriverOpen(
642   PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen
643 );
644 MMRESULT WINAPI acmDriverPriority(
645   HACMDRIVERID hadid, DWORD dwPriority, DWORD fdwPriority
646 );
647 MMRESULT WINAPI acmDriverRemove(
648   HACMDRIVERID hadid, DWORD fdwRemove
649 );
650 MMRESULT WINAPI acmFilterChooseA(
651   PACMFILTERCHOOSEA pafltrc
652 );
653 MMRESULT WINAPI acmFilterChooseW(
654   PACMFILTERCHOOSEW pafltrc
655 );
656 #define acmFilterChoose WINELIB_NAME_AW(acmFilterChoose)
657
658 MMRESULT WINAPI acmFilterDetailsA(
659   HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails
660 );
661 MMRESULT WINAPI acmFilterDetailsW(
662   HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails
663 );
664 #define acmFilterDetails WINELIB_NAME_AW(acmFilterDetails)
665
666 MMRESULT WINAPI acmFilterEnumA(
667   HACMDRIVER had, PACMFILTERDETAILSA pafd,
668   ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
669 );
670 MMRESULT WINAPI acmFilterEnumW(
671   HACMDRIVER had, PACMFILTERDETAILSW pafd,
672   ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
673 );
674 #define acmFilterEnum WINELIB_NAME_AW(acmFilterEnum)
675
676 MMRESULT WINAPI acmFilterTagDetailsA(
677   HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, DWORD fdwDetails
678 );
679 MMRESULT WINAPI acmFilterTagDetailsW(
680   HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails
681 );
682 #define acmFilterTagDetails WINELIB_NAME_AW(acmFilterTagDetails)
683
684 MMRESULT WINAPI acmFilterTagEnumA(
685   HACMDRIVER had, PACMFILTERTAGDETAILSA paftd,
686   ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
687 );
688 MMRESULT WINAPI acmFilterTagEnumW(
689   HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
690   ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
691 );
692 #define acmFilterTagEnum WINELIB_NAME_AW(acmFilterTagEnum)
693
694 MMRESULT WINAPI acmFormatChooseA(
695   PACMFORMATCHOOSEA pafmtc
696 );
697 MMRESULT WINAPI acmFormatChooseW(
698   PACMFORMATCHOOSEW pafmtc
699 );
700 #define acmFormatChoose WINELIB_NAME_AW(acmFormatChoose)
701
702 MMRESULT WINAPI acmFormatDetailsA(
703   HACMDRIVER had, PACMFORMATDETAILSA pafd, DWORD fdwDetails
704 );
705 MMRESULT WINAPI acmFormatDetailsW(
706   HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails
707 );
708 #define acmFormatDetails WINELIB_NAME_AW(acmFormatDetails)
709
710 MMRESULT WINAPI acmFormatEnumA(
711   HACMDRIVER had, PACMFORMATDETAILSA pafd,
712   ACMFORMATENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
713 );
714 MMRESULT WINAPI acmFormatEnumW(
715   HACMDRIVER had, PACMFORMATDETAILSW pafd,
716   ACMFORMATENUMCBW fnCallback, DWORD dwInstance,  DWORD fdwEnum
717 );
718 #define acmFormatEnum WINELIB_NAME_AW(acmFormatEnum)
719
720 MMRESULT WINAPI acmFormatSuggest(
721   HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst,
722   DWORD cbwfxDst, DWORD fdwSuggest
723 );
724 MMRESULT WINAPI acmFormatTagDetailsA(
725   HACMDRIVER had, PACMFORMATTAGDETAILSA paftd, DWORD fdwDetails
726 );
727 MMRESULT WINAPI acmFormatTagDetailsW(
728   HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails
729 );
730 #define acmFormatTagDetails WINELIB_NAME_AW(acmFormatTagDetails)
731
732 MMRESULT WINAPI acmFormatTagEnumA(
733   HACMDRIVER had, PACMFORMATTAGDETAILSA paftd,
734   ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
735 );
736 MMRESULT WINAPI acmFormatTagEnumW(
737   HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
738   ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
739 );
740 #define acmFormatTagEnum WINELIB_NAME_AW(acmFormatTagEnum)
741
742 DWORD WINAPI acmGetVersion(void
743 );
744 MMRESULT WINAPI acmMetrics(
745   HACMOBJ hao, UINT  uMetric, LPVOID  pMetric
746 );
747 MMRESULT WINAPI acmStreamClose(
748   HACMSTREAM has, DWORD fdwClose
749 );
750 MMRESULT WINAPI acmStreamConvert(
751   HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwConvert
752 );
753 MMRESULT WINAPI acmStreamMessage(
754   HACMSTREAM has, UINT uMsg, LPARAM lParam1, LPARAM lParam2
755 );
756 MMRESULT WINAPI acmStreamOpen(
757   PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
758   PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD dwCallback,
759   DWORD dwInstance, DWORD fdwOpen
760 );
761 MMRESULT WINAPI acmStreamPrepareHeader(
762   HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare
763 );
764 MMRESULT WINAPI acmStreamReset(
765   HACMSTREAM has, DWORD fdwReset
766 );
767 MMRESULT WINAPI acmStreamSize(
768   HACMSTREAM has, DWORD cbInput,
769   LPDWORD pdwOutputBytes, DWORD fdwSize
770 );
771 MMRESULT WINAPI acmStreamUnprepareHeader(
772   HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare
773 );
774
775 #ifdef __cplusplus
776 } /* extern "C" */
777 #endif /* defined(__cplusplus) */
778
779 #endif  /* __WINE_MSACM_H */