1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _INC_ACM 7 #define _INC_ACM 8 9 #if !defined(_INC_MMREG) || (_INC_MMREG < 142) 10 #ifndef RC_INVOKED 11 #error MMREG.H version 142 or greater to be included first 12 #endif 13 #endif 14 15 #if defined(UNICODE) && !defined(_UNICODE) 16 #ifndef RC_INVOKED 17 #warning MSACM.H: Defining _UNICODE because application defined UNICODE 18 #endif 19 #define _UNICODE 20 #endif 21 22 #include "pshpack1.h" 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 #ifndef DRV_MAPPER_PREFERRED_INPUT_GET 29 #define DRV_MAPPER_PREFERRED_INPUT_GET (DRV_USER + 0) 30 #endif 31 32 #ifndef DRV_MAPPER_PREFERRED_OUTPUT_GET 33 #define DRV_MAPPER_PREFERRED_OUTPUT_GET (DRV_USER + 2) 34 #endif 35 36 #ifndef DRVM_MAPPER_STATUS 37 #define DRVM_MAPPER (0x2000) 38 #define DRVM_MAPPER_STATUS (DRVM_MAPPER+0) 39 #endif 40 41 #ifndef WIDM_MAPPER_STATUS 42 #define WIDM_MAPPER_STATUS (DRVM_MAPPER_STATUS + 0) 43 #define WAVEIN_MAPPER_STATUS_DEVICE 0 44 #define WAVEIN_MAPPER_STATUS_MAPPED 1 45 #define WAVEIN_MAPPER_STATUS_FORMAT 2 46 #endif 47 48 #ifndef WODM_MAPPER_STATUS 49 #define WODM_MAPPER_STATUS (DRVM_MAPPER_STATUS + 0) 50 #define WAVEOUT_MAPPER_STATUS_DEVICE 0 51 #define WAVEOUT_MAPPER_STATUS_MAPPED 1 52 #define WAVEOUT_MAPPER_STATUS_FORMAT 2 53 #endif 54 55 #define ACMAPI WINAPI 56 57 DECLARE_HANDLE(HACMDRIVERID); 58 59 typedef HACMDRIVERID *PHACMDRIVERID; 60 typedef HACMDRIVERID *LPHACMDRIVERID; 61 62 DECLARE_HANDLE(HACMDRIVER); 63 64 typedef HACMDRIVER *PHACMDRIVER; 65 typedef HACMDRIVER *LPHACMDRIVER; 66 67 DECLARE_HANDLE(HACMSTREAM); 68 69 typedef HACMSTREAM *PHACMSTREAM; 70 typedef HACMSTREAM *LPHACMSTREAM; 71 72 DECLARE_HANDLE(HACMOBJ); 73 74 typedef HACMOBJ *PHACMOBJ; 75 typedef HACMOBJ *LPHACMOBJ; 76 77 #ifndef _MMRESULT_ 78 #define _MMRESULT_ 79 typedef UINT MMRESULT; 80 #endif 81 82 #define ACMERR_BASE (512) 83 #define ACMERR_NOTPOSSIBLE (ACMERR_BASE + 0) 84 #define ACMERR_BUSY (ACMERR_BASE + 1) 85 #define ACMERR_UNPREPARED (ACMERR_BASE + 2) 86 #define ACMERR_CANCELED (ACMERR_BASE + 3) 87 88 #define MM_ACM_OPEN (MM_STREAM_OPEN) 89 #define MM_ACM_CLOSE (MM_STREAM_CLOSE) 90 #define MM_ACM_DONE (MM_STREAM_DONE) 91 92 DWORD ACMAPI acmGetVersion(void); 93 MMRESULT ACMAPI acmMetrics(HACMOBJ hao,UINT uMetric,LPVOID pMetric); 94 95 #define ACM_METRIC_COUNT_DRIVERS 1 96 #define ACM_METRIC_COUNT_CODECS 2 97 #define ACM_METRIC_COUNT_CONVERTERS 3 98 #define ACM_METRIC_COUNT_FILTERS 4 99 #define ACM_METRIC_COUNT_DISABLED 5 100 #define ACM_METRIC_COUNT_HARDWARE 6 101 #define ACM_METRIC_COUNT_LOCAL_DRIVERS 20 102 #define ACM_METRIC_COUNT_LOCAL_CODECS 21 103 #define ACM_METRIC_COUNT_LOCAL_CONVERTERS 22 104 #define ACM_METRIC_COUNT_LOCAL_FILTERS 23 105 #define ACM_METRIC_COUNT_LOCAL_DISABLED 24 106 #define ACM_METRIC_HARDWARE_WAVE_INPUT 30 107 #define ACM_METRIC_HARDWARE_WAVE_OUTPUT 31 108 #define ACM_METRIC_MAX_SIZE_FORMAT 50 109 #define ACM_METRIC_MAX_SIZE_FILTER 51 110 #define ACM_METRIC_DRIVER_SUPPORT 100 111 #define ACM_METRIC_DRIVER_PRIORITY 101 112 113 typedef WINBOOL (CALLBACK *ACMDRIVERENUMCB)(HACMDRIVERID hadid,DWORD_PTR dwInstance,DWORD fdwSupport); 114 115 MMRESULT ACMAPI acmDriverEnum(ACMDRIVERENUMCB fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum); 116 117 #define ACM_DRIVERENUMF_NOLOCAL __MSABI_LONG(0x40000000) 118 #define ACM_DRIVERENUMF_DISABLED __MSABI_LONG(0x80000000) 119 120 MMRESULT ACMAPI acmDriverID(HACMOBJ hao,LPHACMDRIVERID phadid,DWORD fdwDriverID); 121 MMRESULT ACMAPI acmDriverAddA(LPHACMDRIVERID phadid,HINSTANCE hinstModule,LPARAM lParam,DWORD dwPriority,DWORD fdwAdd); 122 MMRESULT ACMAPI acmDriverAddW(LPHACMDRIVERID phadid,HINSTANCE hinstModule,LPARAM lParam,DWORD dwPriority,DWORD fdwAdd); 123 #ifdef _UNICODE 124 #define acmDriverAdd acmDriverAddW 125 #else 126 #define acmDriverAdd acmDriverAddA 127 #endif 128 129 #define ACM_DRIVERADDF_NAME __MSABI_LONG(0x00000001) 130 #define ACM_DRIVERADDF_FUNCTION __MSABI_LONG(0x00000003) 131 #define ACM_DRIVERADDF_NOTIFYHWND __MSABI_LONG(0x00000004) 132 #define ACM_DRIVERADDF_TYPEMASK __MSABI_LONG(0x00000007) 133 #define ACM_DRIVERADDF_LOCAL __MSABI_LONG(0x00000000) 134 #define ACM_DRIVERADDF_GLOBAL __MSABI_LONG(0x00000008) 135 136 typedef LRESULT (CALLBACK *ACMDRIVERPROC)(DWORD_PTR,HACMDRIVERID,UINT,LPARAM,LPARAM); 137 typedef ACMDRIVERPROC *LPACMDRIVERPROC; 138 139 MMRESULT ACMAPI acmDriverRemove(HACMDRIVERID hadid,DWORD fdwRemove); 140 MMRESULT ACMAPI acmDriverOpen(LPHACMDRIVER phad,HACMDRIVERID hadid,DWORD fdwOpen); 141 MMRESULT ACMAPI acmDriverClose(HACMDRIVER had,DWORD fdwClose); 142 LRESULT ACMAPI acmDriverMessage(HACMDRIVER had,UINT uMsg,LPARAM lParam1,LPARAM lParam2); 143 144 #define ACMDM_USER (DRV_USER + 0x0000) 145 #define ACMDM_RESERVED_LOW (DRV_USER + 0x2000) 146 #define ACMDM_RESERVED_HIGH (DRV_USER + 0x2FFF) 147 148 #define ACMDM_BASE ACMDM_RESERVED_LOW 149 150 #define ACMDM_DRIVER_ABOUT (ACMDM_BASE + 11) 151 152 MMRESULT ACMAPI acmDriverPriority(HACMDRIVERID hadid,DWORD dwPriority,DWORD fdwPriority); 153 154 #define ACM_DRIVERPRIORITYF_ENABLE __MSABI_LONG(0x00000001) 155 #define ACM_DRIVERPRIORITYF_DISABLE __MSABI_LONG(0x00000002) 156 #define ACM_DRIVERPRIORITYF_ABLEMASK __MSABI_LONG(0x00000003) 157 #define ACM_DRIVERPRIORITYF_BEGIN __MSABI_LONG(0x00010000) 158 #define ACM_DRIVERPRIORITYF_END __MSABI_LONG(0x00020000) 159 #define ACM_DRIVERPRIORITYF_DEFERMASK __MSABI_LONG(0x00030000) 160 161 #define ACMDRIVERDETAILS_SHORTNAME_CHARS 32 162 #define ACMDRIVERDETAILS_LONGNAME_CHARS 128 163 #define ACMDRIVERDETAILS_COPYRIGHT_CHARS 80 164 #define ACMDRIVERDETAILS_LICENSING_CHARS 128 165 #define ACMDRIVERDETAILS_FEATURES_CHARS 512 166 167 typedef struct tACMDRIVERDETAILSA { 168 DWORD cbStruct; 169 FOURCC fccType; 170 FOURCC fccComp; 171 WORD wMid; 172 WORD wPid; 173 DWORD vdwACM; 174 DWORD vdwDriver; 175 DWORD fdwSupport; 176 DWORD cFormatTags; 177 DWORD cFilterTags; 178 HICON hicon; 179 char szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]; 180 char szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]; 181 char szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]; 182 char szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]; 183 char szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]; 184 } ACMDRIVERDETAILSA,*PACMDRIVERDETAILSA,*LPACMDRIVERDETAILSA; 185 186 typedef struct tACMDRIVERDETAILSW { 187 DWORD cbStruct; 188 FOURCC fccType; 189 FOURCC fccComp; 190 WORD wMid; 191 WORD wPid; 192 DWORD vdwACM; 193 DWORD vdwDriver; 194 DWORD fdwSupport; 195 DWORD cFormatTags; 196 DWORD cFilterTags; 197 HICON hicon; 198 WCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]; 199 WCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]; 200 WCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]; 201 WCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]; 202 WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]; 203 } ACMDRIVERDETAILSW,*PACMDRIVERDETAILSW,*LPACMDRIVERDETAILSW; 204 #ifdef _UNICODE 205 #define ACMDRIVERDETAILS ACMDRIVERDETAILSW 206 #define PACMDRIVERDETAILS PACMDRIVERDETAILSW 207 #define LPACMDRIVERDETAILS LPACMDRIVERDETAILSW 208 #else 209 #define ACMDRIVERDETAILS ACMDRIVERDETAILSA 210 #define PACMDRIVERDETAILS PACMDRIVERDETAILSA 211 #define LPACMDRIVERDETAILS LPACMDRIVERDETAILSA 212 #endif 213 214 #define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC mmioFOURCC('a','u','d','c') 215 #define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED mmioFOURCC('\0','\0','\0','\0') 216 217 #define ACMDRIVERDETAILS_SUPPORTF_CODEC __MSABI_LONG(0x00000001) 218 #define ACMDRIVERDETAILS_SUPPORTF_CONVERTER __MSABI_LONG(0x00000002) 219 #define ACMDRIVERDETAILS_SUPPORTF_FILTER __MSABI_LONG(0x00000004) 220 #define ACMDRIVERDETAILS_SUPPORTF_HARDWARE __MSABI_LONG(0x00000008) 221 #define ACMDRIVERDETAILS_SUPPORTF_ASYNC __MSABI_LONG(0x00000010) 222 #define ACMDRIVERDETAILS_SUPPORTF_LOCAL __MSABI_LONG(0x40000000) 223 #define ACMDRIVERDETAILS_SUPPORTF_DISABLED __MSABI_LONG(0x80000000) 224 225 MMRESULT ACMAPI acmDriverDetailsA(HACMDRIVERID hadid,LPACMDRIVERDETAILSA padd,DWORD fdwDetails); 226 MMRESULT ACMAPI acmDriverDetailsW(HACMDRIVERID hadid,LPACMDRIVERDETAILSW padd,DWORD fdwDetails); 227 #ifdef _UNICODE 228 #define acmDriverDetails acmDriverDetailsW 229 #else 230 #define acmDriverDetails acmDriverDetailsA 231 #endif 232 233 #define ACMFORMATTAGDETAILS_FORMATTAG_CHARS 48 234 235 typedef struct tACMFORMATTAGDETAILSA { 236 DWORD cbStruct; 237 DWORD dwFormatTagIndex; 238 DWORD dwFormatTag; 239 DWORD cbFormatSize; 240 DWORD fdwSupport; 241 DWORD cStandardFormats; 242 char szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]; 243 } ACMFORMATTAGDETAILSA,*PACMFORMATTAGDETAILSA,*LPACMFORMATTAGDETAILSA; 244 245 typedef struct tACMFORMATTAGDETAILSW { 246 DWORD cbStruct; 247 DWORD dwFormatTagIndex; 248 DWORD dwFormatTag; 249 DWORD cbFormatSize; 250 DWORD fdwSupport; 251 DWORD cStandardFormats; 252 WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]; 253 } ACMFORMATTAGDETAILSW,*PACMFORMATTAGDETAILSW,*LPACMFORMATTAGDETAILSW; 254 #ifdef _UNICODE 255 #define ACMFORMATTAGDETAILS ACMFORMATTAGDETAILSW 256 #define PACMFORMATTAGDETAILS PACMFORMATTAGDETAILSW 257 #define LPACMFORMATTAGDETAILS LPACMFORMATTAGDETAILSW 258 #else 259 #define ACMFORMATTAGDETAILS ACMFORMATTAGDETAILSA 260 #define PACMFORMATTAGDETAILS PACMFORMATTAGDETAILSA 261 #define LPACMFORMATTAGDETAILS LPACMFORMATTAGDETAILSA 262 #endif 263 264 MMRESULT ACMAPI acmFormatTagDetailsA(HACMDRIVER had,LPACMFORMATTAGDETAILSA paftd,DWORD fdwDetails); 265 MMRESULT ACMAPI acmFormatTagDetailsW(HACMDRIVER had,LPACMFORMATTAGDETAILSW paftd,DWORD fdwDetails); 266 #ifdef _UNICODE 267 #define acmFormatTagDetails acmFormatTagDetailsW 268 #else 269 #define acmFormatTagDetails acmFormatTagDetailsA 270 #endif 271 272 #define ACM_FORMATTAGDETAILSF_INDEX __MSABI_LONG(0x00000000) 273 #define ACM_FORMATTAGDETAILSF_FORMATTAG __MSABI_LONG(0x00000001) 274 #define ACM_FORMATTAGDETAILSF_LARGESTSIZE __MSABI_LONG(0x00000002) 275 #define ACM_FORMATTAGDETAILSF_QUERYMASK __MSABI_LONG(0x0000000F) 276 277 typedef WINBOOL (CALLBACK *ACMFORMATTAGENUMCBA)(HACMDRIVERID hadid,LPACMFORMATTAGDETAILSA paftd,DWORD_PTR dwInstance,DWORD fdwSupport); 278 typedef WINBOOL (CALLBACK *ACMFORMATTAGENUMCBW)(HACMDRIVERID hadid,LPACMFORMATTAGDETAILSW paftd,DWORD_PTR dwInstance,DWORD fdwSupport); 279 280 MMRESULT ACMAPI acmFormatTagEnumA(HACMDRIVER had,LPACMFORMATTAGDETAILSA paftd,ACMFORMATTAGENUMCBA fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum); 281 MMRESULT ACMAPI acmFormatTagEnumW(HACMDRIVER had,LPACMFORMATTAGDETAILSW paftd,ACMFORMATTAGENUMCBW fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum); 282 #ifdef _UNICODE 283 #define ACMFORMATTAGENUMCB ACMFORMATTAGENUMCBW 284 #define acmFormatTagEnum acmFormatTagEnumW 285 #else 286 #define ACMFORMATTAGENUMCB ACMFORMATTAGENUMCBA 287 #define acmFormatTagEnum acmFormatTagEnumA 288 #endif 289 290 #define ACMFORMATDETAILS_FORMAT_CHARS 128 291 292 typedef struct tACMFORMATDETAILSA { 293 DWORD cbStruct; 294 DWORD dwFormatIndex; 295 DWORD dwFormatTag; 296 DWORD fdwSupport; 297 LPWAVEFORMATEX pwfx; 298 DWORD cbwfx; 299 char szFormat[ACMFORMATDETAILS_FORMAT_CHARS]; 300 } ACMFORMATDETAILSA,*PACMFORMATDETAILSA,*LPACMFORMATDETAILSA; 301 302 typedef struct tACMFORMATDETAILSW { 303 DWORD cbStruct; 304 DWORD dwFormatIndex; 305 DWORD dwFormatTag; 306 DWORD fdwSupport; 307 LPWAVEFORMATEX pwfx; 308 DWORD cbwfx; 309 WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]; 310 } ACMFORMATDETAILSW,*PACMFORMATDETAILSW,*LPACMFORMATDETAILSW; 311 #ifdef _UNICODE 312 #define ACMFORMATDETAILS ACMFORMATDETAILSW 313 #define PACMFORMATDETAILS PACMFORMATDETAILSW 314 #define LPACMFORMATDETAILS LPACMFORMATDETAILSW 315 #else 316 #define ACMFORMATDETAILS ACMFORMATDETAILSA 317 #define PACMFORMATDETAILS PACMFORMATDETAILSA 318 #define LPACMFORMATDETAILS LPACMFORMATDETAILSA 319 #endif 320 321 MMRESULT ACMAPI acmFormatDetailsA(HACMDRIVER had,LPACMFORMATDETAILSA pafd,DWORD fdwDetails); 322 MMRESULT ACMAPI acmFormatDetailsW(HACMDRIVER had,LPACMFORMATDETAILSW pafd,DWORD fdwDetails); 323 #ifdef _UNICODE 324 #define acmFormatDetails acmFormatDetailsW 325 #else 326 #define acmFormatDetails acmFormatDetailsA 327 #endif 328 329 #define ACM_FORMATDETAILSF_INDEX __MSABI_LONG(0x00000000) 330 #define ACM_FORMATDETAILSF_FORMAT __MSABI_LONG(0x00000001) 331 #define ACM_FORMATDETAILSF_QUERYMASK __MSABI_LONG(0x0000000F) 332 333 typedef WINBOOL (CALLBACK *ACMFORMATENUMCBA)(HACMDRIVERID hadid,LPACMFORMATDETAILSA pafd,DWORD_PTR dwInstance,DWORD fdwSupport); 334 typedef WINBOOL (CALLBACK *ACMFORMATENUMCBW)(HACMDRIVERID hadid,LPACMFORMATDETAILSW pafd,DWORD_PTR dwInstance,DWORD fdwSupport); 335 336 MMRESULT ACMAPI acmFormatEnumA(HACMDRIVER had,LPACMFORMATDETAILSA pafd,ACMFORMATENUMCBA fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum); 337 MMRESULT ACMAPI acmFormatEnumW(HACMDRIVER had,LPACMFORMATDETAILSW pafd,ACMFORMATENUMCBW fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum); 338 #ifdef _UNICODE 339 #define ACMFORMATENUMCB ACMFORMATENUMCBW 340 #define acmFormatEnum acmFormatEnumW 341 #else 342 #define ACMFORMATENUMCB ACMFORMATENUMCBA 343 #define acmFormatEnum acmFormatEnumA 344 #endif 345 346 #define ACM_FORMATENUMF_WFORMATTAG __MSABI_LONG(0x00010000) 347 #define ACM_FORMATENUMF_NCHANNELS __MSABI_LONG(0x00020000) 348 #define ACM_FORMATENUMF_NSAMPLESPERSEC __MSABI_LONG(0x00040000) 349 #define ACM_FORMATENUMF_WBITSPERSAMPLE __MSABI_LONG(0x00080000) 350 #define ACM_FORMATENUMF_CONVERT __MSABI_LONG(0x00100000) 351 #define ACM_FORMATENUMF_SUGGEST __MSABI_LONG(0x00200000) 352 #define ACM_FORMATENUMF_HARDWARE __MSABI_LONG(0x00400000) 353 #define ACM_FORMATENUMF_INPUT __MSABI_LONG(0x00800000) 354 #define ACM_FORMATENUMF_OUTPUT __MSABI_LONG(0x01000000) 355 356 MMRESULT ACMAPI acmFormatSuggest 357 (HACMDRIVER had,LPWAVEFORMATEX pwfxSrc,LPWAVEFORMATEX pwfxDst,DWORD cbwfxDst,DWORD fdwSuggest); 358 359 #define ACM_FORMATSUGGESTF_WFORMATTAG __MSABI_LONG(0x00010000) 360 #define ACM_FORMATSUGGESTF_NCHANNELS __MSABI_LONG(0x00020000) 361 #define ACM_FORMATSUGGESTF_NSAMPLESPERSEC __MSABI_LONG(0x00040000) 362 #define ACM_FORMATSUGGESTF_WBITSPERSAMPLE __MSABI_LONG(0x00080000) 363 364 #define ACM_FORMATSUGGESTF_TYPEMASK __MSABI_LONG(0x00FF0000) 365 366 #define ACMHELPMSGSTRINGA "acmchoose_help" 367 #define ACMHELPMSGSTRINGW L"acmchoose_help" 368 #define ACMHELPMSGCONTEXTMENUA "acmchoose_contextmenu" 369 #define ACMHELPMSGCONTEXTMENUW L"acmchoose_contextmenu" 370 #define ACMHELPMSGCONTEXTHELPA "acmchoose_contexthelp" 371 #define ACMHELPMSGCONTEXTHELPW L"acmchoose_contexthelp" 372 #ifdef _UNICODE 373 #define ACMHELPMSGSTRING ACMHELPMSGSTRINGW 374 #define ACMHELPMSGCONTEXTMENU ACMHELPMSGCONTEXTMENUW 375 #define ACMHELPMSGCONTEXTHELP ACMHELPMSGCONTEXTHELPW 376 #else 377 #define ACMHELPMSGSTRING ACMHELPMSGSTRINGA 378 #define ACMHELPMSGCONTEXTMENU ACMHELPMSGCONTEXTMENUA 379 #define ACMHELPMSGCONTEXTHELP ACMHELPMSGCONTEXTHELPA 380 #endif 381 382 #define MM_ACM_FORMATCHOOSE (0x8000) 383 384 #define FORMATCHOOSE_MESSAGE 0 385 #define FORMATCHOOSE_FORMATTAG_VERIFY (FORMATCHOOSE_MESSAGE+0) 386 #define FORMATCHOOSE_FORMAT_VERIFY (FORMATCHOOSE_MESSAGE+1) 387 #define FORMATCHOOSE_CUSTOM_VERIFY (FORMATCHOOSE_MESSAGE+2) 388 389 typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCA)(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam); 390 typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCW)(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam); 391 #ifdef _UNICODE 392 #define ACMFORMATCHOOSEHOOKPROC ACMFORMATCHOOSEHOOKPROCW 393 #else 394 #define ACMFORMATCHOOSEHOOKPROC ACMFORMATCHOOSEHOOKPROCA 395 #endif 396 397 typedef struct tACMFORMATCHOOSEA { 398 DWORD cbStruct; 399 DWORD fdwStyle; 400 HWND hwndOwner; 401 LPWAVEFORMATEX pwfx; 402 DWORD cbwfx; 403 LPCSTR pszTitle; 404 char szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]; 405 char szFormat[ACMFORMATDETAILS_FORMAT_CHARS]; 406 LPSTR pszName; 407 DWORD cchName; 408 DWORD fdwEnum; 409 LPWAVEFORMATEX pwfxEnum; 410 HINSTANCE hInstance; 411 LPCSTR pszTemplateName; 412 LPARAM lCustData; 413 ACMFORMATCHOOSEHOOKPROCA pfnHook; 414 } ACMFORMATCHOOSEA,*PACMFORMATCHOOSEA,*LPACMFORMATCHOOSEA; 415 416 typedef struct tACMFORMATCHOOSEW { 417 DWORD cbStruct; 418 DWORD fdwStyle; 419 HWND hwndOwner; 420 LPWAVEFORMATEX pwfx; 421 DWORD cbwfx; 422 LPCWSTR pszTitle; 423 WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]; 424 WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]; 425 LPWSTR pszName; 426 DWORD cchName; 427 DWORD fdwEnum; 428 LPWAVEFORMATEX pwfxEnum; 429 HINSTANCE hInstance; 430 LPCWSTR pszTemplateName; 431 LPARAM lCustData; 432 ACMFORMATCHOOSEHOOKPROCW pfnHook; 433 } ACMFORMATCHOOSEW,*PACMFORMATCHOOSEW,*LPACMFORMATCHOOSEW; 434 #ifdef _UNICODE 435 #define ACMFORMATCHOOSE ACMFORMATCHOOSEW 436 #define PACMFORMATCHOOSE PACMFORMATCHOOSEW 437 #define LPACMFORMATCHOOSE LPACMFORMATCHOOSEW 438 #else 439 #define ACMFORMATCHOOSE ACMFORMATCHOOSEA 440 #define PACMFORMATCHOOSE PACMFORMATCHOOSEA 441 #define LPACMFORMATCHOOSE LPACMFORMATCHOOSEA 442 #endif 443 444 #define ACMFORMATCHOOSE_STYLEF_SHOWHELP __MSABI_LONG(0x00000004) 445 #define ACMFORMATCHOOSE_STYLEF_ENABLEHOOK __MSABI_LONG(0x00000008) 446 #define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE __MSABI_LONG(0x00000010) 447 #define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE __MSABI_LONG(0x00000020) 448 #define ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT __MSABI_LONG(0x00000040) 449 #define ACMFORMATCHOOSE_STYLEF_CONTEXTHELP __MSABI_LONG(0x00000080) 450 451 MMRESULT ACMAPI acmFormatChooseA(LPACMFORMATCHOOSEA pafmtc); 452 MMRESULT ACMAPI acmFormatChooseW(LPACMFORMATCHOOSEW pafmtc); 453 #ifdef _UNICODE 454 #define acmFormatChoose acmFormatChooseW 455 #else 456 #define acmFormatChoose acmFormatChooseA 457 #endif 458 459 #define ACMFILTERTAGDETAILS_FILTERTAG_CHARS 48 460 461 typedef struct tACMFILTERTAGDETAILSA { 462 DWORD cbStruct; 463 DWORD dwFilterTagIndex; 464 DWORD dwFilterTag; 465 DWORD cbFilterSize; 466 DWORD fdwSupport; 467 DWORD cStandardFilters; 468 char szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]; 469 } ACMFILTERTAGDETAILSA,*PACMFILTERTAGDETAILSA,*LPACMFILTERTAGDETAILSA; 470 471 typedef struct tACMFILTERTAGDETAILSW { 472 DWORD cbStruct; 473 DWORD dwFilterTagIndex; 474 DWORD dwFilterTag; 475 DWORD cbFilterSize; 476 DWORD fdwSupport; 477 DWORD cStandardFilters; 478 WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]; 479 } ACMFILTERTAGDETAILSW,*PACMFILTERTAGDETAILSW,*LPACMFILTERTAGDETAILSW; 480 #ifdef _UNICODE 481 #define ACMFILTERTAGDETAILS ACMFILTERTAGDETAILSW 482 #define PACMFILTERTAGDETAILS PACMFILTERTAGDETAILSW 483 #define LPACMFILTERTAGDETAILS LPACMFILTERTAGDETAILSW 484 #else 485 #define ACMFILTERTAGDETAILS ACMFILTERTAGDETAILSA 486 #define PACMFILTERTAGDETAILS PACMFILTERTAGDETAILSA 487 #define LPACMFILTERTAGDETAILS LPACMFILTERTAGDETAILSA 488 #endif 489 490 MMRESULT ACMAPI acmFilterTagDetailsA(HACMDRIVER had,LPACMFILTERTAGDETAILSA paftd,DWORD fdwDetails); 491 MMRESULT ACMAPI acmFilterTagDetailsW(HACMDRIVER had,LPACMFILTERTAGDETAILSW paftd,DWORD fdwDetails); 492 #ifdef _UNICODE 493 #define acmFilterTagDetails acmFilterTagDetailsW 494 #else 495 #define acmFilterTagDetails acmFilterTagDetailsA 496 #endif 497 498 #define ACM_FILTERTAGDETAILSF_INDEX __MSABI_LONG(0x00000000) 499 #define ACM_FILTERTAGDETAILSF_FILTERTAG __MSABI_LONG(0x00000001) 500 #define ACM_FILTERTAGDETAILSF_LARGESTSIZE __MSABI_LONG(0x00000002) 501 #define ACM_FILTERTAGDETAILSF_QUERYMASK __MSABI_LONG(0x0000000F) 502 503 typedef WINBOOL (CALLBACK *ACMFILTERTAGENUMCBA)(HACMDRIVERID hadid,LPACMFILTERTAGDETAILSA paftd,DWORD_PTR dwInstance,DWORD fdwSupport); 504 typedef WINBOOL (CALLBACK *ACMFILTERTAGENUMCBW)(HACMDRIVERID hadid,LPACMFILTERTAGDETAILSW paftd,DWORD_PTR dwInstance,DWORD fdwSupport); 505 506 MMRESULT ACMAPI acmFilterTagEnumA(HACMDRIVER had,LPACMFILTERTAGDETAILSA paftd,ACMFILTERTAGENUMCBA fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum); 507 MMRESULT ACMAPI acmFilterTagEnumW(HACMDRIVER had,LPACMFILTERTAGDETAILSW paftd,ACMFILTERTAGENUMCBW fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum); 508 #ifdef _UNICODE 509 #define ACMFILTERTAGENUMCB ACMFILTERTAGENUMCBW 510 #define acmFilterTagEnum acmFilterTagEnumW 511 #else 512 #define ACMFILTERTAGENUMCB ACMFILTERTAGENUMCBA 513 #define acmFilterTagEnum acmFilterTagEnumA 514 #endif 515 516 #define ACMFILTERDETAILS_FILTER_CHARS 128 517 518 typedef struct tACMFILTERDETAILSA { 519 DWORD cbStruct; 520 DWORD dwFilterIndex; 521 DWORD dwFilterTag; 522 DWORD fdwSupport; 523 LPWAVEFILTER pwfltr; 524 DWORD cbwfltr; 525 char szFilter[ACMFILTERDETAILS_FILTER_CHARS]; 526 } ACMFILTERDETAILSA,*PACMFILTERDETAILSA,*LPACMFILTERDETAILSA; 527 528 typedef struct tACMFILTERDETAILSW { 529 DWORD cbStruct; 530 DWORD dwFilterIndex; 531 DWORD dwFilterTag; 532 DWORD fdwSupport; 533 LPWAVEFILTER pwfltr; 534 DWORD cbwfltr; 535 WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS]; 536 } ACMFILTERDETAILSW,*PACMFILTERDETAILSW,*LPACMFILTERDETAILSW; 537 #ifdef _UNICODE 538 #define ACMFILTERDETAILS ACMFILTERDETAILSW 539 #define PACMFILTERDETAILS PACMFILTERDETAILSW 540 #define LPACMFILTERDETAILS LPACMFILTERDETAILSW 541 #else 542 #define ACMFILTERDETAILS ACMFILTERDETAILSA 543 #define PACMFILTERDETAILS PACMFILTERDETAILSA 544 #define LPACMFILTERDETAILS LPACMFILTERDETAILSA 545 #endif 546 547 MMRESULT ACMAPI acmFilterDetailsA(HACMDRIVER had,LPACMFILTERDETAILSA pafd,DWORD fdwDetails); 548 MMRESULT ACMAPI acmFilterDetailsW(HACMDRIVER had,LPACMFILTERDETAILSW pafd,DWORD fdwDetails); 549 #ifdef _UNICODE 550 #define acmFilterDetails acmFilterDetailsW 551 #else 552 #define acmFilterDetails acmFilterDetailsA 553 #endif 554 555 #define ACM_FILTERDETAILSF_INDEX __MSABI_LONG(0x00000000) 556 #define ACM_FILTERDETAILSF_FILTER __MSABI_LONG(0x00000001) 557 #define ACM_FILTERDETAILSF_QUERYMASK __MSABI_LONG(0x0000000F) 558 559 typedef WINBOOL (CALLBACK *ACMFILTERENUMCBA)(HACMDRIVERID hadid,LPACMFILTERDETAILSA pafd,DWORD_PTR dwInstance,DWORD fdwSupport); 560 typedef WINBOOL (CALLBACK *ACMFILTERENUMCBW)(HACMDRIVERID hadid,LPACMFILTERDETAILSW pafd,DWORD_PTR dwInstance,DWORD fdwSupport); 561 562 MMRESULT ACMAPI acmFilterEnumA(HACMDRIVER had,LPACMFILTERDETAILSA pafd,ACMFILTERENUMCBA fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum); 563 MMRESULT ACMAPI acmFilterEnumW(HACMDRIVER had,LPACMFILTERDETAILSW pafd,ACMFILTERENUMCBW fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum); 564 #ifdef _UNICODE 565 #define ACMFILTERENUMCB ACMFILTERENUMCBW 566 #define acmFilterEnum acmFilterEnumW 567 #else 568 #define ACMFILTERENUMCB ACMFILTERENUMCBA 569 #define acmFilterEnum acmFilterEnumA 570 #endif 571 572 #define ACM_FILTERENUMF_DWFILTERTAG __MSABI_LONG(0x00010000) 573 574 #define MM_ACM_FILTERCHOOSE (0x8000) 575 576 #define FILTERCHOOSE_MESSAGE 0 577 #define FILTERCHOOSE_FILTERTAG_VERIFY (FILTERCHOOSE_MESSAGE+0) 578 #define FILTERCHOOSE_FILTER_VERIFY (FILTERCHOOSE_MESSAGE+1) 579 #define FILTERCHOOSE_CUSTOM_VERIFY (FILTERCHOOSE_MESSAGE+2) 580 581 typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCA)(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam); 582 typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCW)(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam); 583 #ifdef _UNICODE 584 #define ACMFILTERCHOOSEHOOKPROC ACMFILTERCHOOSEHOOKPROCW 585 #else 586 #define ACMFILTERCHOOSEHOOKPROC ACMFILTERCHOOSEHOOKPROCA 587 #endif 588 589 typedef struct tACMFILTERCHOOSEA { 590 DWORD cbStruct; 591 DWORD fdwStyle; 592 HWND hwndOwner; 593 LPWAVEFILTER pwfltr; 594 DWORD cbwfltr; 595 LPCSTR pszTitle; 596 char szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]; 597 char szFilter[ACMFILTERDETAILS_FILTER_CHARS]; 598 LPSTR pszName; 599 DWORD cchName; 600 DWORD fdwEnum; 601 LPWAVEFILTER pwfltrEnum; 602 HINSTANCE hInstance; 603 LPCSTR pszTemplateName; 604 LPARAM lCustData; 605 ACMFILTERCHOOSEHOOKPROCA pfnHook; 606 } ACMFILTERCHOOSEA,*PACMFILTERCHOOSEA,*LPACMFILTERCHOOSEA; 607 608 typedef struct tACMFILTERCHOOSEW { 609 DWORD cbStruct; 610 DWORD fdwStyle; 611 HWND hwndOwner; 612 LPWAVEFILTER pwfltr; 613 DWORD cbwfltr; 614 LPCWSTR pszTitle; 615 WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]; 616 WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS]; 617 LPWSTR pszName; 618 DWORD cchName; 619 DWORD fdwEnum; 620 LPWAVEFILTER pwfltrEnum; 621 HINSTANCE hInstance; 622 LPCWSTR pszTemplateName; 623 LPARAM lCustData; 624 ACMFILTERCHOOSEHOOKPROCW pfnHook; 625 } ACMFILTERCHOOSEW,*PACMFILTERCHOOSEW,*LPACMFILTERCHOOSEW; 626 #ifdef _UNICODE 627 #define ACMFILTERCHOOSE ACMFILTERCHOOSEW 628 #define PACMFILTERCHOOSE PACMFILTERCHOOSEW 629 #define LPACMFILTERCHOOSE LPACMFILTERCHOOSEW 630 #else 631 #define ACMFILTERCHOOSE ACMFILTERCHOOSEA 632 #define PACMFILTERCHOOSE PACMFILTERCHOOSEA 633 #define LPACMFILTERCHOOSE LPACMFILTERCHOOSEA 634 #endif 635 636 #define ACMFILTERCHOOSE_STYLEF_SHOWHELP __MSABI_LONG(0x00000004) 637 #define ACMFILTERCHOOSE_STYLEF_ENABLEHOOK __MSABI_LONG(0x00000008) 638 #define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE __MSABI_LONG(0x00000010) 639 #define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE __MSABI_LONG(0x00000020) 640 #define ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT __MSABI_LONG(0x00000040) 641 #define ACMFILTERCHOOSE_STYLEF_CONTEXTHELP __MSABI_LONG(0x00000080) 642 643 MMRESULT ACMAPI acmFilterChooseA(LPACMFILTERCHOOSEA pafltrc); 644 MMRESULT ACMAPI acmFilterChooseW(LPACMFILTERCHOOSEW pafltrc); 645 #ifdef _UNICODE 646 #define acmFilterChoose acmFilterChooseW 647 #else 648 #define acmFilterChoose acmFilterChooseA 649 #endif 650 651 #ifdef _WIN64 652 #define _DRVRESERVED 15 653 #else 654 #define _DRVRESERVED 10 655 #endif 656 657 typedef struct tACMSTREAMHEADER { 658 DWORD cbStruct; 659 DWORD fdwStatus; 660 DWORD_PTR dwUser; 661 LPBYTE pbSrc; 662 DWORD cbSrcLength; 663 DWORD cbSrcLengthUsed; 664 DWORD_PTR dwSrcUser; 665 LPBYTE pbDst; 666 DWORD cbDstLength; 667 DWORD cbDstLengthUsed; 668 DWORD_PTR dwDstUser; 669 DWORD dwReservedDriver[_DRVRESERVED]; 670 } ACMSTREAMHEADER,*PACMSTREAMHEADER,*LPACMSTREAMHEADER; 671 672 #define ACMSTREAMHEADER_STATUSF_DONE __MSABI_LONG(0x00010000) 673 #define ACMSTREAMHEADER_STATUSF_PREPARED __MSABI_LONG(0x00020000) 674 #define ACMSTREAMHEADER_STATUSF_INQUEUE __MSABI_LONG(0x00100000) 675 676 MMRESULT ACMAPI acmStreamOpen(LPHACMSTREAM phas,HACMDRIVER had,LPWAVEFORMATEX pwfxSrc,LPWAVEFORMATEX pwfxDst,LPWAVEFILTER pwfltr,DWORD_PTR dwCallback,DWORD_PTR dwInstance,DWORD fdwOpen); 677 678 #define ACM_STREAMOPENF_QUERY 0x00000001 679 #define ACM_STREAMOPENF_ASYNC 0x00000002 680 #define ACM_STREAMOPENF_NONREALTIME 0x00000004 681 682 MMRESULT ACMAPI acmStreamClose 683 (HACMSTREAM has,DWORD fdwClose); 684 685 MMRESULT ACMAPI acmStreamSize(HACMSTREAM has,DWORD cbInput,LPDWORD pdwOutputBytes,DWORD fdwSize); 686 687 #define ACM_STREAMSIZEF_SOURCE __MSABI_LONG(0x00000000) 688 #define ACM_STREAMSIZEF_DESTINATION __MSABI_LONG(0x00000001) 689 #define ACM_STREAMSIZEF_QUERYMASK __MSABI_LONG(0x0000000F) 690 691 MMRESULT ACMAPI acmStreamReset(HACMSTREAM has,DWORD fdwReset); 692 MMRESULT ACMAPI acmStreamMessage(HACMSTREAM has,UINT uMsg,LPARAM lParam1,LPARAM lParam2); 693 MMRESULT ACMAPI acmStreamConvert(HACMSTREAM has,LPACMSTREAMHEADER pash,DWORD fdwConvert); 694 695 #define ACM_STREAMCONVERTF_BLOCKALIGN 0x00000004 696 #define ACM_STREAMCONVERTF_START 0x00000010 697 #define ACM_STREAMCONVERTF_END 0x00000020 698 699 MMRESULT ACMAPI acmStreamPrepareHeader(HACMSTREAM has,LPACMSTREAMHEADER pash,DWORD fdwPrepare); 700 MMRESULT ACMAPI acmStreamUnprepareHeader(HACMSTREAM has,LPACMSTREAMHEADER pash,DWORD fdwUnprepare); 701 702 #include "poppack.h" 703 704 #ifdef __cplusplus 705 } 706 #endif 707 #endif 708