msacm.h 23.6 KB
Newer Older
1
/*
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
 * Declarations for MSACM
 *
 * Copyright (C) the Wine project
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 20 21 22 23
 */

#ifndef __WINE_MSACM_H
#define __WINE_MSACM_H

24
#include "windef.h"
25 26 27
#include "mmsystem.h"
#include "mmreg.h"

28 29 30 31
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */

Eric Pouech's avatar
Eric Pouech committed
32 33
#define ACMAPI              WINAPI

34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
/***********************************************************************
 * Defines/Enums
 */
#define ACMERR_BASE        512
#define ACMERR_NOTPOSSIBLE (ACMERR_BASE + 0)
#define ACMERR_BUSY        (ACMERR_BASE + 1)
#define ACMERR_UNPREPARED  (ACMERR_BASE + 2)
#define ACMERR_CANCELED    (ACMERR_BASE + 3)

#define MM_ACM_OPEN  MM_STREAM_OPEN
#define MM_ACM_CLOSE MM_STREAM_CLOSE
#define MM_ACM_DONE  MM_STREAM_DONE

#define ACM_DRIVERADDF_FUNCTION   0x00000003L
#define ACM_DRIVERADDF_NOTIFYHWND 0x00000004L
#define ACM_DRIVERADDF_TYPEMASK   0x00000007L
#define ACM_DRIVERADDF_LOCAL      0x00000000L
#define ACM_DRIVERADDF_GLOBAL     0x00000008L

#define ACMDRIVERDETAILS_SHORTNAME_CHARS  32
#define ACMDRIVERDETAILS_LONGNAME_CHARS  128
#define ACMDRIVERDETAILS_COPYRIGHT_CHARS  80
#define ACMDRIVERDETAILS_LICENSING_CHARS 128
#define ACMDRIVERDETAILS_FEATURES_CHARS  512

#define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC mmioFOURCC('a', 'u', 'd', 'c')
#define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED  mmioFOURCC('\0', '\0', '\0', '\0')

#define ACMDRIVERDETAILS_SUPPORTF_CODEC     0x00000001L
#define ACMDRIVERDETAILS_SUPPORTF_CONVERTER 0x00000002L
#define ACMDRIVERDETAILS_SUPPORTF_FILTER    0x00000004L
#define ACMDRIVERDETAILS_SUPPORTF_HARDWARE  0x00000008L
#define ACMDRIVERDETAILS_SUPPORTF_ASYNC     0x00000010L
#define ACMDRIVERDETAILS_SUPPORTF_LOCAL     0x40000000L
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED  0x80000000L

#define ACM_DRIVERENUMF_NOLOCAL  0x40000000L
#define ACM_DRIVERENUMF_DISABLED 0x80000000L

#define ACM_DRIVERPRIORITYF_ENABLE    0x00000001L
#define ACM_DRIVERPRIORITYF_DISABLE   0x00000002L
#define ACM_DRIVERPRIORITYF_ABLEMASK  0x00000003L
#define ACM_DRIVERPRIORITYF_BEGIN     0x00010000L
#define ACM_DRIVERPRIORITYF_END       0x00020000L
#define ACM_DRIVERPRIORITYF_DEFERMASK 0x00030000L

#define MM_ACM_FILTERCHOOSE 0x8000

#define FILTERCHOOSE_MESSAGE          0
#define FILTERCHOOSE_FILTERTAG_VERIFY (FILTERCHOOSE_MESSAGE+0)
#define FILTERCHOOSE_FILTER_VERIFY    (FILTERCHOOSE_MESSAGE+1)
#define FILTERCHOOSE_CUSTOM_VERIFY    (FILTERCHOOSE_MESSAGE+2)

#define ACMFILTERCHOOSE_STYLEF_SHOWHELP             0x00000004L
#define ACMFILTERCHOOSE_STYLEF_ENABLEHOOK           0x00000008L
#define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE       0x00000010L
#define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE 0x00000020L
#define ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT   0x00000040L
#define ACMFILTERCHOOSE_STYLEF_CONTEXTHELP          0x00000080L

#define ACMFILTERDETAILS_FILTER_CHARS 128

#define ACM_FILTERDETAILSF_INDEX     0x00000000L
#define ACM_FILTERDETAILSF_FILTER    0x00000001L
#define ACM_FILTERDETAILSF_QUERYMASK 0x0000000FL

#define ACMFILTERTAGDETAILS_FILTERTAG_CHARS 48

#define ACM_FILTERTAGDETAILSF_INDEX       0x00000000L
#define ACM_FILTERTAGDETAILSF_FILTERTAG   0x00000001L
#define ACM_FILTERTAGDETAILSF_LARGESTSIZE 0x00000002L
#define ACM_FILTERTAGDETAILSF_QUERYMASK   0x0000000FL

#define ACM_FILTERENUMF_DWFILTERTAG 0x00010000L

109
#define ACMHELPMSGSTRINGA       "acmchoose_help"
110 111 112 113 114 115
#if defined(__GNUC__)
# define ACMHELPMSGSTRINGW (const WCHAR []){ 'a','c','m', \
  'c','h','o','o','s','e','_','h','e','l','p',0 }
#elif defined(_MSC_VER)
# define ACMHELPMSGSTRINGW      L"acmchoose_help"
#else
116 117
static const WCHAR ACMHELPMSGSTRINGW[] = { 'a','c','m',
  'c','h','o','o','s','e','_','h','e','l','p',0 };
118
#endif
Eric Pouech's avatar
Eric Pouech committed
119
#define ACMHELPMSGSTRING WINELIB_NAME_AW(ACMHELPMSGSTRING)
120

121
#define ACMHELPMSGCONTEXTMENUA  "acmchoose_contextmenu"
122 123 124 125 126 127
#if defined(__GNUC__)
# define ACMHELPMSGCONTEXTMENUW (const WCHAR []){ 'a','c','m', \
  'c','h','o','o','s','e','_','c','o','n','t','e','x','t','m','e','n','u',0 }
#elif defined(_MSC_VER)
# define ACMHELPMSGCONTEXTMENUW L"acmchoose_contextmenu"
#else
128 129
static const WCHAR ACMHELPMSGCONTEXTMENUW[] = { 'a','c','m',
  'c','h','o','o','s','e','_','c','o','n','t','e','x','t','m','e','n','u',0 };
130
#endif
Eric Pouech's avatar
Eric Pouech committed
131
#define ACMHELPMSGCONTEXTMENU WINELIB_NAME_AW(ACMHELPMSGCONTEXTMENU)
132

133
#define ACMHELPMSGCONTEXTHELPA  "acmchoose_contexthelp"
134 135 136 137 138 139
#if defined(__GNUC__)
# define ACMHELPMSGCONTEXTHELPW (const WCHAR []){ 'a','c','m', \
  'c','h','o','o','s','e','_','c','o','n','t','e','x','t','h','e','l','p',0 }
#elif defined(_MSC_VER)
# define ACMHELPMSGCONTEXTHELPW L"acmchoose_contexthelp"
#else
140 141
static const WCHAR ACMHELPMSGCONTEXTHELPW[] = { 'a','c','m',
  'c','h','o','o','s','e','_','c','o','n','t','e','x','t','h','e','l','p',0 };
142
#endif
Eric Pouech's avatar
Eric Pouech committed
143
#define ACMHELPMSGCONTEXTHELP WINELIB_NAME_AW(ACMHELPMSGCONTEXTHELP)
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229

#define MM_ACM_FORMATCHOOSE 0x8000

#define FORMATCHOOSE_MESSAGE          0
#define FORMATCHOOSE_FORMATTAG_VERIFY (FORMATCHOOSE_MESSAGE+0)
#define FORMATCHOOSE_FORMAT_VERIFY    (FORMATCHOOSE_MESSAGE+1)
#define FORMATCHOOSE_CUSTOM_VERIFY    (FORMATCHOOSE_MESSAGE+2)

#define ACMFORMATCHOOSE_STYLEF_SHOWHELP             0x00000004L
#define ACMFORMATCHOOSE_STYLEF_ENABLEHOOK           0x00000008L
#define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE       0x00000010L
#define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE 0x00000020L
#define ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT      0x00000040L
#define ACMFORMATCHOOSE_STYLEF_CONTEXTHELP          0x00000080L

#define ACMFORMATDETAILS_FORMAT_CHARS   128

#define ACM_FORMATDETAILSF_INDEX     0x00000000L
#define ACM_FORMATDETAILSF_FORMAT    0x00000001L
#define ACM_FORMATDETAILSF_QUERYMASK 0x0000000FL

#define ACM_FORMATENUMF_WFORMATTAG     0x00010000L
#define ACM_FORMATENUMF_NCHANNELS      0x00020000L
#define ACM_FORMATENUMF_NSAMPLESPERSEC 0x00040000L
#define ACM_FORMATENUMF_WBITSPERSAMPLE 0x00080000L
#define ACM_FORMATENUMF_CONVERT        0x00100000L
#define ACM_FORMATENUMF_SUGGEST        0x00200000L
#define ACM_FORMATENUMF_HARDWARE       0x00400000L
#define ACM_FORMATENUMF_INPUT          0x00800000L
#define ACM_FORMATENUMF_OUTPUT         0x01000000L

#define ACM_FORMATSUGGESTF_WFORMATTAG     0x00010000L
#define ACM_FORMATSUGGESTF_NCHANNELS      0x00020000L
#define ACM_FORMATSUGGESTF_NSAMPLESPERSEC 0x00040000L
#define ACM_FORMATSUGGESTF_WBITSPERSAMPLE 0x00080000L
#define ACM_FORMATSUGGESTF_TYPEMASK       0x00FF0000L

#define ACMFORMATTAGDETAILS_FORMATTAG_CHARS 48

#define ACM_FORMATTAGDETAILSF_INDEX       0x00000000L
#define ACM_FORMATTAGDETAILSF_FORMATTAG   0x00000001L
#define ACM_FORMATTAGDETAILSF_LARGESTSIZE 0x00000002L
#define ACM_FORMATTAGDETAILSF_QUERYMASK   0x0000000FL

#define ACM_METRIC_COUNT_DRIVERS            1
#define ACM_METRIC_COUNT_CODECS             2
#define ACM_METRIC_COUNT_CONVERTERS         3
#define ACM_METRIC_COUNT_FILTERS            4
#define ACM_METRIC_COUNT_DISABLED           5
#define ACM_METRIC_COUNT_HARDWARE           6
#define ACM_METRIC_COUNT_LOCAL_DRIVERS     20
#define ACM_METRIC_COUNT_LOCAL_CODECS      21
#define ACM_METRIC_COUNT_LOCAL_CONVERTERS  22
#define ACM_METRIC_COUNT_LOCAL_FILTERS     23
#define ACM_METRIC_COUNT_LOCAL_DISABLED    24
#define ACM_METRIC_HARDWARE_WAVE_INPUT     30
#define ACM_METRIC_HARDWARE_WAVE_OUTPUT    31
#define ACM_METRIC_MAX_SIZE_FORMAT         50
#define ACM_METRIC_MAX_SIZE_FILTER         51
#define ACM_METRIC_DRIVER_SUPPORT         100
#define ACM_METRIC_DRIVER_PRIORITY        101

#define ACM_STREAMCONVERTF_BLOCKALIGN 0x00000004
#define ACM_STREAMCONVERTF_START      0x00000010
#define ACM_STREAMCONVERTF_END        0x00000020

#define ACMSTREAMHEADER_STATUSF_DONE     0x00010000L
#define ACMSTREAMHEADER_STATUSF_PREPARED 0x00020000L
#define ACMSTREAMHEADER_STATUSF_INQUEUE  0x00100000L

#define ACM_STREAMOPENF_QUERY       0x00000001
#define ACM_STREAMOPENF_ASYNC       0x00000002
#define ACM_STREAMOPENF_NONREALTIME 0x00000004

#define ACM_STREAMSIZEF_SOURCE      0x00000000L
#define ACM_STREAMSIZEF_DESTINATION 0x00000001L
#define ACM_STREAMSIZEF_QUERYMASK   0x0000000FL

#define ACMDM_USER                  (DRV_USER + 0x0000)
#define ACMDM_RESERVED_LOW          (DRV_USER + 0x2000)
#define ACMDM_RESERVED_HIGH         (DRV_USER + 0x2FFF)

#define ACMDM_BASE                  ACMDM_RESERVED_LOW

#define ACMDM_DRIVER_ABOUT          (ACMDM_BASE + 11)

230 231
/* handles */

232 233 234
DECLARE_HANDLE(HACMDRIVERID);
DECLARE_HANDLE(HACMDRIVER);
DECLARE_HANDLE(HACMSTREAM);
235
DECLARE_HANDLE(HACMOBJ);
236

237 238 239 240
/***********************************************************************
 * Callbacks
 */

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 265 266

/***********************************************************************
 * Structures
 */

267
typedef struct _ACMDRIVERDETAILSA
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
{
  DWORD    cbStruct;

  FOURCC   fccType;
  FOURCC   fccComp;

  WORD     wMid;
  WORD     wPid;

  DWORD    vdwACM;
  DWORD    vdwDriver;

  DWORD    fdwSupport;
  DWORD    cFormatTags;
  DWORD    cFilterTags;

284
  HICON  hicon;
285 286 287 288 289 290

  CHAR     szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
  CHAR     szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
  CHAR     szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
  CHAR     szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
  CHAR     szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
Eric Pouech's avatar
Eric Pouech committed
291
} ACMDRIVERDETAILSA, *PACMDRIVERDETAILSA, *LPACMDRIVERDETAILSA;
292

293
typedef struct _ACMDRIVERDETAILSW
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
{
  DWORD    cbStruct;

  FOURCC   fccType;
  FOURCC   fccComp;

  WORD     wMid;
  WORD     wPid;

  DWORD    vdwACM;
  DWORD    vdwDriver;

  DWORD    fdwSupport;
  DWORD    cFormatTags;
  DWORD    cFilterTags;

310
  HICON  hicon;
311 312 313 314 315 316

  WCHAR    szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
  WCHAR    szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
  WCHAR    szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
  WCHAR    szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
  WCHAR    szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
Eric Pouech's avatar
Eric Pouech committed
317
} ACMDRIVERDETAILSW, *PACMDRIVERDETAILSW, *LPACMDRIVERDETAILSW;
318

319 320
DECL_WINELIB_TYPE_AW(ACMDRIVERDETAILS)
DECL_WINELIB_TYPE_AW(PACMDRIVERDETAILS)
Eric Pouech's avatar
Eric Pouech committed
321
DECL_WINELIB_TYPE_AW(LPACMDRIVERDETAILS)
322

323
typedef struct _ACMFILTERCHOOSEA
324 325 326 327
{
  DWORD         cbStruct;
  DWORD         fdwStyle;

328
  HWND        hwndOwner;
329

330
  PWAVEFILTER   pwfltr;
331 332 333 334 335 336 337 338 339 340
  DWORD         cbwfltr;

  LPCSTR        pszTitle;

  CHAR          szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
  CHAR          szFilter[ACMFILTERDETAILS_FILTER_CHARS];
  LPSTR         pszName;
  DWORD         cchName;

  DWORD         fdwEnum;
341
  PWAVEFILTER   pwfltrEnum;
342

343
  HINSTANCE   hInstance;
344 345
  LPCSTR        pszTemplateName;
  LPARAM        lCustData;
346
  ACMFILTERCHOOSEHOOKPROCA pfnHook;
Eric Pouech's avatar
Eric Pouech committed
347
} ACMFILTERCHOOSEA, *PACMFILTERCHOOSEA, *LPACMFILTERCHOOSEA;
348

349
typedef struct _ACMFILTERCHOOSEW
350 351 352 353
{
  DWORD         cbStruct;
  DWORD         fdwStyle;

354
  HWND        hwndOwner;
355

356
  PWAVEFILTER   pwfltr;
357 358 359 360 361 362 363 364 365 366
  DWORD         cbwfltr;

  LPCWSTR       pszTitle;

  WCHAR         szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
  WCHAR         szFilter[ACMFILTERDETAILS_FILTER_CHARS];
  LPWSTR        pszName;
  DWORD         cchName;

  DWORD         fdwEnum;
367
  PWAVEFILTER   pwfltrEnum;
368

369
  HINSTANCE   hInstance;
370 371
  LPCWSTR       pszTemplateName;
  LPARAM        lCustData;
372
  ACMFILTERCHOOSEHOOKPROCW pfnHook;
Eric Pouech's avatar
Eric Pouech committed
373
} ACMFILTERCHOOSEW, *PACMFILTERCHOOSEW, *LPACMFILTERCHOOSEW;
374

375 376
DECL_WINELIB_TYPE_AW(ACMFILTERCHOOSE)
DECL_WINELIB_TYPE_AW(PACMFILTERCHOOSE)
Eric Pouech's avatar
Eric Pouech committed
377
DECL_WINELIB_TYPE_AW(LPACMFILTERCHOOSE)
378

379
typedef struct _ACMFILTERDETAILSA
380 381 382 383 384
{
  DWORD           cbStruct;
  DWORD           dwFilterIndex;
  DWORD           dwFilterTag;
  DWORD           fdwSupport;
385
  PWAVEFILTER     pwfltr;
386 387
  DWORD           cbwfltr;
  CHAR            szFilter[ACMFILTERDETAILS_FILTER_CHARS];
Eric Pouech's avatar
Eric Pouech committed
388
} ACMFILTERDETAILSA, *PACMFILTERDETAILSA, *LPACMFILTERDETAILSA;
389

390
typedef struct _ACMFILTERDETAILSW
391 392 393 394 395
{
  DWORD          cbStruct;
  DWORD          dwFilterIndex;
  DWORD          dwFilterTag;
  DWORD          fdwSupport;
396
  PWAVEFILTER    pwfltr;
397 398
  DWORD          cbwfltr;
  WCHAR          szFilter[ACMFILTERDETAILS_FILTER_CHARS];
Eric Pouech's avatar
Eric Pouech committed
399
} ACMFILTERDETAILSW, *PACMFILTERDETAILSW, *LPACMFILTERDETAILSW;
400

401 402
DECL_WINELIB_TYPE_AW(ACMFILTERDETAILS)
DECL_WINELIB_TYPE_AW(PACMFILTERDETAILS)
Eric Pouech's avatar
Eric Pouech committed
403
DECL_WINELIB_TYPE_AW(LPACMFILTERDETAILS)
404

405
typedef struct _ACMFILTERTAGDETAILSA
406 407 408 409 410 411 412 413
{
  DWORD cbStruct;
  DWORD dwFilterTagIndex;
  DWORD dwFilterTag;
  DWORD cbFilterSize;
  DWORD fdwSupport;
  DWORD cStandardFilters;
  CHAR  szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
Eric Pouech's avatar
Eric Pouech committed
414
} ACMFILTERTAGDETAILSA, *PACMFILTERTAGDETAILSA, *LPACMFILTERTAGDETAILSA;
415

416
typedef struct _ACMFILTERTAGDETAILSW
417 418 419 420 421 422 423 424
{
  DWORD cbStruct;
  DWORD dwFilterTagIndex;
  DWORD dwFilterTag;
  DWORD cbFilterSize;
  DWORD fdwSupport;
  DWORD cStandardFilters;
  WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
Eric Pouech's avatar
Eric Pouech committed
425
} ACMFILTERTAGDETAILSW, *PACMFILTERTAGDETAILSW, *LPACMFILTERTAGDETAILSW;
426

427 428
DECL_WINELIB_TYPE_AW(ACMFILTERTAGDETAILS)
DECL_WINELIB_TYPE_AW(PACMFILTERTAGDETAILS)
Eric Pouech's avatar
Eric Pouech committed
429
DECL_WINELIB_TYPE_AW(LPACMFILTERTAGDETAILS)
430

431
typedef struct _ACMFORMATCHOOSEA
432 433 434
{
  DWORD           cbStruct;
  DWORD           fdwStyle;
435

436
  HWND          hwndOwner;
437

438
  PWAVEFORMATEX   pwfx;
439 440
  DWORD           cbwfx;
  LPCSTR          pszTitle;
441

442
  CHAR            szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
443
  CHAR            szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
444 445 446 447 448

  LPSTR           pszName;
  DWORD           cchName;

  DWORD           fdwEnum;
449
  PWAVEFORMATEX   pwfxEnum;
450

451
  HINSTANCE     hInstance;
452 453
  LPCSTR          pszTemplateName;
  LPARAM          lCustData;
454
  ACMFORMATCHOOSEHOOKPROCA pfnHook;
Eric Pouech's avatar
Eric Pouech committed
455
} ACMFORMATCHOOSEA, *PACMFORMATCHOOSEA, *LPACMFORMATCHOOSEA;
456

457
typedef struct _ACMFORMATCHOOSEW
458 459 460
{
  DWORD           cbStruct;
  DWORD           fdwStyle;
461

462
  HWND          hwndOwner;
463

464
  PWAVEFORMATEX   pwfx;
465 466
  DWORD           cbwfx;
  LPCWSTR         pszTitle;
467

468
  WCHAR           szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
469
  WCHAR           szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
470 471 472 473 474 475

  LPWSTR          pszName;
  DWORD           cchName;

  DWORD           fdwEnum;
  LPWAVEFORMATEX  pwfxEnum;
476

477
  HINSTANCE     hInstance;
478 479
  LPCWSTR         pszTemplateName;
  LPARAM          lCustData;
480
  ACMFORMATCHOOSEHOOKPROCW pfnHook;
Eric Pouech's avatar
Eric Pouech committed
481
} ACMFORMATCHOOSEW, *PACMFORMATCHOOSEW, *LPACMFORMATCHOOSEW;
482

483 484
DECL_WINELIB_TYPE_AW(ACMFORMATCHOOSE)
DECL_WINELIB_TYPE_AW(PACMFORMATCHOOSE)
Eric Pouech's avatar
Eric Pouech committed
485
DECL_WINELIB_TYPE_AW(LPACMFORMATCHOOSE)
486

487
typedef struct _ACMFORMATDETAILSA
488 489 490 491 492
{
  DWORD           cbStruct;
  DWORD           dwFormatIndex;
  DWORD           dwFormatTag;
  DWORD           fdwSupport;
493
  PWAVEFORMATEX   pwfx;
494 495
  DWORD           cbwfx;
  CHAR            szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
Eric Pouech's avatar
Eric Pouech committed
496
} ACMFORMATDETAILSA, *PACMFORMATDETAILSA, *LPACMFORMATDETAILSA;
497

498
typedef struct _ACMFORMATDETAILSW
499 500 501 502 503
{
    DWORD           cbStruct;
    DWORD           dwFormatIndex;
    DWORD           dwFormatTag;
    DWORD           fdwSupport;
504
    PWAVEFORMATEX   pwfx;
505 506
    DWORD           cbwfx;
    WCHAR           szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
Eric Pouech's avatar
Eric Pouech committed
507
} ACMFORMATDETAILSW, *PACMFORMATDETAILSW, *LPACMFORMATDETAILSW;
508

509 510
DECL_WINELIB_TYPE_AW(ACMFORMATDETAILS)
DECL_WINELIB_TYPE_AW(PACMFORMATDETAILS)
Eric Pouech's avatar
Eric Pouech committed
511
DECL_WINELIB_TYPE_AW(LPACMFORMATDETAILS)
512

513
typedef struct _ACMFORMATTAGDETAILSA
514 515 516 517 518 519 520 521
{
  DWORD cbStruct;
  DWORD dwFormatTagIndex;
  DWORD dwFormatTag;
  DWORD cbFormatSize;
  DWORD fdwSupport;
  DWORD cStandardFormats;
  CHAR  szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
Eric Pouech's avatar
Eric Pouech committed
522
} ACMFORMATTAGDETAILSA, *PACMFORMATTAGDETAILSA, *LPACMFORMATTAGDETAILSA;
523

524
typedef struct _ACMFORMATTAGDETAILSW
525 526 527 528 529 530 531 532
{
  DWORD cbStruct;
  DWORD dwFormatTagIndex;
  DWORD dwFormatTag;
  DWORD cbFormatSize;
  DWORD fdwSupport;
  DWORD cStandardFormats;
  WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
Eric Pouech's avatar
Eric Pouech committed
533
} ACMFORMATTAGDETAILSW, *PACMFORMATTAGDETAILSW, *LPACMFORMATTAGDETAILSW;
534

535 536
DECL_WINELIB_TYPE_AW(ACMFORMATTAGDETAILS)
DECL_WINELIB_TYPE_AW(PACMFORMATTAGDETAILS)
Eric Pouech's avatar
Eric Pouech committed
537
DECL_WINELIB_TYPE_AW(LPACMFORMATTAGDETAILS)
538

539 540 541 542 543 544 545 546 547 548 549 550 551 552
typedef struct _ACMSTREAMHEADER
{
  DWORD  cbStruct;
  DWORD  fdwStatus;
  DWORD  dwUser;
  LPBYTE pbSrc;
  DWORD  cbSrcLength;
  DWORD  cbSrcLengthUsed;
  DWORD  dwSrcUser;
  LPBYTE pbDst;
  DWORD  cbDstLength;
  DWORD  cbDstLengthUsed;
  DWORD  dwDstUser;
  DWORD  dwReservedDriver[10];
Eric Pouech's avatar
Eric Pouech committed
553
} ACMSTREAMHEADER, *PACMSTREAMHEADER, *LPACMSTREAMHEADER;
554 555 556 557 558

/***********************************************************************
 * Callbacks 2
 */

559
typedef BOOL (CALLBACK *ACMFILTERENUMCBA)(
560
  HACMDRIVERID hadid, PACMFILTERDETAILSA pafd,
561 562 563
  DWORD dwInstance, DWORD fdwSupport
);

564
typedef BOOL (CALLBACK *ACMFILTERENUMCBW)(
565
  HACMDRIVERID hadid, PACMFILTERDETAILSW pafd,
566 567 568
  DWORD dwInstance, DWORD fdwSupport
);

569 570
#define ACMFILTERENUMCB WINELIB_NAME_AW(ACMFILTERENUMCB)

571
typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBA)(
572
  HACMDRIVERID hadid, PACMFILTERTAGDETAILSA paftd,
573 574 575
  DWORD dwInstance, DWORD fdwSupport
);

576
typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBW)(
577
  HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftd,
578 579 580
  DWORD dwInstance, DWORD fdwSupport
);

581 582
#define ACMFILTERTAGENUMCB WINELIB_NAME_AW(ACMFILTERTAGENUMCB)

583
typedef BOOL (CALLBACK *ACMFORMATENUMCBA)(
584
  HACMDRIVERID hadid, PACMFORMATDETAILSA pafd,
585 586 587
  DWORD dwInstance, DWORD fdwSupport
);

588
typedef BOOL (CALLBACK *ACMFORMATENUMCBW)(
589
  HACMDRIVERID hadid, PACMFORMATDETAILSW pafd,
590 591 592
  DWORD dwInstance, DWORD fdwSupport
);

593 594
#define ACMFORMATENUMCB WINELIB_NAME_AW(ACMFORMATENUMCB)

595
typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBA)(
596
  HACMDRIVERID hadid, PACMFORMATTAGDETAILSA paftd,
597 598 599
  DWORD dwInstance, DWORD fdwSupport
);

600
typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBW)(
601
  HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftd,
602 603 604
  DWORD dwInstance, DWORD fdwSupport
);

605 606
#define ACMFORMATTAGENUMCB WINELIB_NAME_AW(ACMFORMATTAGENUMCB)

607 608 609 610
/***********************************************************************
 * Functions - Win32
 */

611 612
MMRESULT WINAPI acmDriverAddA(
  PHACMDRIVERID phadid, HINSTANCE hinstModule,
613 614
  LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
);
615 616
MMRESULT WINAPI acmDriverAddW(
  PHACMDRIVERID phadid, HINSTANCE hinstModule,
617 618
  LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
);
619 620
#define acmDriverAdd WINELIB_NAME_AW(acmDriverAdd)

621 622
MMRESULT WINAPI acmDriverClose(
  HACMDRIVER had, DWORD fdwClose
623
);
624 625
MMRESULT WINAPI acmDriverDetailsA(
  HACMDRIVERID hadid, PACMDRIVERDETAILSA padd, DWORD fdwDetails
626
);
627 628
MMRESULT WINAPI acmDriverDetailsW(
  HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails
629
);
630 631
#define acmDriverDetails WINELIB_NAME_AW(acmDriverDetails)

632 633
MMRESULT WINAPI acmDriverEnum(
  ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum
634
);
635 636
MMRESULT WINAPI acmDriverID(
  HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID
637
);
638 639
LRESULT WINAPI acmDriverMessage(
  HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2
640
);
641 642
MMRESULT WINAPI acmDriverOpen(
  PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen
643
);
644 645
MMRESULT WINAPI acmDriverPriority(
  HACMDRIVERID hadid, DWORD dwPriority, DWORD fdwPriority
646
);
647 648
MMRESULT WINAPI acmDriverRemove(
  HACMDRIVERID hadid, DWORD fdwRemove
649
);
650 651
MMRESULT WINAPI acmFilterChooseA(
  PACMFILTERCHOOSEA pafltrc
652
);
653 654
MMRESULT WINAPI acmFilterChooseW(
  PACMFILTERCHOOSEW pafltrc
655
);
656 657
#define acmFilterChoose WINELIB_NAME_AW(acmFilterChoose)

658 659
MMRESULT WINAPI acmFilterDetailsA(
  HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails
660
);
661 662
MMRESULT WINAPI acmFilterDetailsW(
  HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails
663
);
664 665
#define acmFilterDetails WINELIB_NAME_AW(acmFilterDetails)

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 675
#define acmFilterEnum WINELIB_NAME_AW(acmFilterEnum)

676 677
MMRESULT WINAPI acmFilterTagDetailsA(
  HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, DWORD fdwDetails
678
);
679 680
MMRESULT WINAPI acmFilterTagDetailsW(
  HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails
681
);
682 683
#define acmFilterTagDetails WINELIB_NAME_AW(acmFilterTagDetails)

684 685 686
MMRESULT WINAPI acmFilterTagEnumA(
  HACMDRIVER had, PACMFILTERTAGDETAILSA paftd,
  ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
687
);
688 689 690
MMRESULT WINAPI acmFilterTagEnumW(
  HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
  ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
691
);
692 693
#define acmFilterTagEnum WINELIB_NAME_AW(acmFilterTagEnum)

694 695
MMRESULT WINAPI acmFormatChooseA(
  PACMFORMATCHOOSEA pafmtc
696
);
697 698
MMRESULT WINAPI acmFormatChooseW(
  PACMFORMATCHOOSEW pafmtc
699
);
700 701
#define acmFormatChoose WINELIB_NAME_AW(acmFormatChoose)

702 703
MMRESULT WINAPI acmFormatDetailsA(
  HACMDRIVER had, PACMFORMATDETAILSA pafd, DWORD fdwDetails
704
);
705 706
MMRESULT WINAPI acmFormatDetailsW(
  HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails
707
);
708 709
#define acmFormatDetails WINELIB_NAME_AW(acmFormatDetails)

710 711 712
MMRESULT WINAPI acmFormatEnumA(
  HACMDRIVER had, PACMFORMATDETAILSA pafd,
  ACMFORMATENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
713
);
714 715 716
MMRESULT WINAPI acmFormatEnumW(
  HACMDRIVER had, PACMFORMATDETAILSW pafd,
  ACMFORMATENUMCBW fnCallback, DWORD dwInstance,  DWORD fdwEnum
717
);
718 719
#define acmFormatEnum WINELIB_NAME_AW(acmFormatEnum)

720 721
MMRESULT WINAPI acmFormatSuggest(
  HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst,
722 723
  DWORD cbwfxDst, DWORD fdwSuggest
);
724 725
MMRESULT WINAPI acmFormatTagDetailsA(
  HACMDRIVER had, PACMFORMATTAGDETAILSA paftd, DWORD fdwDetails
726
);
727 728
MMRESULT WINAPI acmFormatTagDetailsW(
  HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails
729
);
730 731
#define acmFormatTagDetails WINELIB_NAME_AW(acmFormatTagDetails)

732 733 734
MMRESULT WINAPI acmFormatTagEnumA(
  HACMDRIVER had, PACMFORMATTAGDETAILSA paftd,
  ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
735
);
736 737 738
MMRESULT WINAPI acmFormatTagEnumW(
  HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
  ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
739
);
740 741
#define acmFormatTagEnum WINELIB_NAME_AW(acmFormatTagEnum)

Eric Pouech's avatar
Eric Pouech committed
742
DWORD WINAPI acmGetVersion(void
743
);
744 745
MMRESULT WINAPI acmMetrics(
  HACMOBJ hao, UINT  uMetric, LPVOID  pMetric
746
);
747 748
MMRESULT WINAPI acmStreamClose(
  HACMSTREAM has, DWORD fdwClose
749
);
750 751
MMRESULT WINAPI acmStreamConvert(
  HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwConvert
752
);
753 754
MMRESULT WINAPI acmStreamMessage(
  HACMSTREAM has, UINT uMsg, LPARAM lParam1, LPARAM lParam2
755
);
756 757
MMRESULT WINAPI acmStreamOpen(
  PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
758
  PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD dwCallback,
759 760
  DWORD dwInstance, DWORD fdwOpen
);
761 762
MMRESULT WINAPI acmStreamPrepareHeader(
  HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare
763
);
764 765
MMRESULT WINAPI acmStreamReset(
  HACMSTREAM has, DWORD fdwReset
766
);
767
MMRESULT WINAPI acmStreamSize(
768
  HACMSTREAM has, DWORD cbInput,
769 770
  LPDWORD pdwOutputBytes, DWORD fdwSize
);
771 772
MMRESULT WINAPI acmStreamUnprepareHeader(
  HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare
773 774
);

775 776 777 778
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */

779
#endif  /* __WINE_MSACM_H */