' ########################################################################################
' Microsoft Windows
' File: MSAcm.inc
' Contents: Audio Compression Manager Public Header File
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_MSAcm_PBI)
#DEFINE PBX_MSAcm_PBI
%EQUATE `MSACM_INC = 1
#INCLUDE ONCE "Core/Windows.inc"
#INCLUDE ONCE "Legacy/System/MMReg.inc"
'#include "pshpack1.h" /* Assume byte packing throughout */
#IF NOT %DEF(%DRV_MAPPER_PREFERRED_INPUT_GET)
%EQUATE `DRV_MAPPER_PREFERRED_INPUT_GET = (%DRV_USER + 0)
#ENDIF
#IF NOT %DEF(%DRV_MAPPER_PREFERRED_OUTPUT_GET)
%EQUATE `DRV_MAPPER_PREFERRED_OUTPUT_GET = (%DRV_USER + 2)
#ENDIF
#IF NOT %DEF(%DRVM_MAPPER_STATUS)
%EQUATE `DRVM_MAPPER = &H2000
%EQUATE `DRVM_MAPPER_STATUS = %DRVM_MAPPER + 0
#ENDIF
#IF NOT %DEF(%WIDM_MAPPER_STATUS)
%EQUATE `WIDM_MAPPER_STATUS = %DRVM_MAPPER_STATUS + 0
%EQUATE `WAVEIN_MAPPER_STATUS_DEVICE = 0
%EQUATE `WAVEIN_MAPPER_STATUS_MAPPED = 1
%EQUATE `WAVEIN_MAPPER_STATUS_FORMAT = 2
#ENDIF
#IF NOT %DEF(%WODM_MAPPER_STATUS)
%EQUATE `WODM_MAPPER_STATUS = (%DRVM_MAPPER_STATUS + 0)
%EQUATE `WAVEOUT_MAPPER_STATUS_DEVICE = 0
%EQUATE `WAVEOUT_MAPPER_STATUS_MAPPED = 1
%EQUATE `WAVEOUT_MAPPER_STATUS_FORMAT = 2
#ENDIF
'//--------------------------------------------------------------------------;
'//
'// ACM General API's and Defines
'//
'//
'//
'//
'//--------------------------------------------------------------------------;
'//
'// there are four types of 'handles' used by the ACM. the first three
'// are unique types that define specific objects:
'//
'// HACMDRIVERID: used to _identify_ an ACM driver. this identifier can be
'// used to _open_ the driver for querying details, etc about the driver.
'//
'// HACMDRIVER: used to manage a driver (codec, filter, etc). this handle
'// is much like a handle to other media drivers--you use it to send
'// messages to the converter, query for capabilities, etc.
'//
'// HACMSTREAM: used to manage a 'stream' (conversion channel) with the
'// ACM. you use a stream handle to convert data from one format/type
'// to another--much like dealing with a file handle.
'//
'//
'// the fourth handle type is a generic type used on ACM functions that
'// can accept two or more of the above handle types (for example the
'// acmMetrics and acmDriverID functions).
'//
'// HACMOBJ: used to identify ACM objects. this handle is used on functions
'// that can accept two or more ACM handle types.
'//
'DECLARE_HANDLE(HACMDRIVERID);
'typedef HACMDRIVERID *PHACMDRIVERID;
'typedef HACMDRIVERID FAR *LPHACMDRIVERID;
'DECLARE_HANDLE(HACMDRIVER);
'typedef HACMDRIVER *PHACMDRIVER;
'typedef HACMDRIVER FAR *LPHACMDRIVER;
'DECLARE_HANDLE(HACMSTREAM);
'typedef HACMSTREAM *PHACMSTREAM;
'typedef HACMSTREAM FAR *LPHACMSTREAM;
'DECLARE_HANDLE(HACMOBJ);
'typedef HACMOBJ *PHACMOBJ;
'typedef HACMOBJ FAR *LPHACMOBJ;
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// ACM Error Codes
'//
'// Note that these error codes are specific errors that apply to the ACM
'// directly--general errors are defined as MMSYSERR_*.
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'#ifndef _MMRESULT_
'#define _MMRESULT_
'typedef UINT MMRESULT;
'#endif
%EQUATE `ACMERR_BASE = 512
%EQUATE `ACMERR_NOTPOSSIBLE = %ACMERR_BASE + 0
%EQUATE `ACMERR_BUSY = %ACMERR_BASE + 1
%EQUATE `ACMERR_UNPREPARED = %ACMERR_BASE + 2
%EQUATE `ACMERR_CANCELED = %ACMERR_BASE + 3
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// ACM Window Messages
'//
'// These window messages are sent by the ACM or ACM drivers to notify
'// applications of events.
'//
'// Note that these window message numbers will also be defined in
'// mmsystem.
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
#IF NOT %DEF(%MM_STREAM_OPEN)
 %MM_STREAM_OPEN = &H3D4
#ENDIF
#IF NOT %DEF(%MM_STREAM_CLOSE)
 %MM_STREAM_CLOSE = &H3D5
#ENDIF
#IF NOT %DEF(%MM_STREAM_DONE)
 %MM_STREAM_DONE = &H3D6
#ENDIF
%EQUATE `MM_ACM_OPEN = %MM_STREAM_OPEN ' // conversion callback messages
%EQUATE `MM_ACM_CLOSE = %MM_STREAM_CLOSE
%EQUATE `MM_ACM_DONE = %MM_STREAM_DONE
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmGetVersion()
'//
'// the ACM version is a 32 bit number that is broken into three parts as
'// follows:
'//
'// bits 24 - 31: 8 bit _major_ version number
'// bits 16 - 23: 8 bit _minor_ version number
'// bits 0 - 15: 16 bit build number
'//
'// this is then displayed as follows:
'//
'// bMajor = (BYTE)(dwVersion >> 24)
'// bMinor = (BYTE)(dwVersion >> 16) &
'// wBuild = LOWORD(dwVersion)
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmGetVersion LIB "msacm32.dll" ALIAS "acmGetVersion" ( ) AS QUAD
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmMetrics()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmMetrics LIB "msacm32.dll" ALIAS "acmMetrics" ( BYVAL hao AS QUAD , BYVAL uMetric AS QUAD , BYVAL pMetric AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_METRIC_COUNT_DRIVERS = 1
%EQUATE `ACM_METRIC_COUNT_CODECS = 2
%EQUATE `ACM_METRIC_COUNT_CONVERTERS = 3
%EQUATE `ACM_METRIC_COUNT_FILTERS = 4
%EQUATE `ACM_METRIC_COUNT_DISABLED = 5
%EQUATE `ACM_METRIC_COUNT_HARDWARE = 6
%EQUATE `ACM_METRIC_COUNT_LOCAL_DRIVERS = 20
%EQUATE `ACM_METRIC_COUNT_LOCAL_CODECS = 21
%EQUATE `ACM_METRIC_COUNT_LOCAL_CONVERTERS = 22
%EQUATE `ACM_METRIC_COUNT_LOCAL_FILTERS = 23
%EQUATE `ACM_METRIC_COUNT_LOCAL_DISABLED = 24
%EQUATE `ACM_METRIC_HARDWARE_WAVE_INPUT = 30
%EQUATE `ACM_METRIC_HARDWARE_WAVE_OUTPUT = 31
%EQUATE `ACM_METRIC_MAX_SIZE_FORMAT = 50
%EQUATE `ACM_METRIC_MAX_SIZE_FILTER = 51
%EQUATE `ACM_METRIC_DRIVER_SUPPORT = 100
%EQUATE `ACM_METRIC_DRIVER_PRIORITY = 101
'//--------------------------------------------------------------------------;
'//
'// ACM Drivers
'//
'//
'//
'//
'//--------------------------------------------------------------------------;
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmDriverEnum()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'typedef BOOL (CALLBACK *ACMDRIVERENUMCB)
'(
' HACMDRIVERID hadid,
' DWORD_PTR dwInstance,
' DWORD fdwSupport
');
'DECLARE FUNCTION ACMDRIVERENUMCB ( ' , BYVAL hadid AS DWORD ' HACMDRIVERID hadid
' , BYVAL dwInstance AS DWORD ' DWORD_PTR dwInstance
' , BYVAL fdwSupport AS DWORD ' DWORD fdwSupport
' ) AS LONG
DECLARE FUNCTION acmDriverEnum LIB "msacm32.dll" ALIAS "acmDriverEnum" ( BYVAL fnCallback AS DWORD
 , BYVAL dwInstance AS DWORD
 , BYVAL fdwEnum AS DWORD
 ) AS DWORD ' MMRESULT
%EQUATE `ACM_DRIVERENUMF_NOLOCAL = &H40000000
%EQUATE `ACM_DRIVERENUMF_DISABLED = &H80000000
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmDriverID()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmDriverID LIB "msacm32.dll" ALIAS "acmDriverID" ( BYVAL hao AS QUAD , BYVAL phadid AS QUAD , BYVAL fdwDriverID AS QUAD ) AS QUAD ' MMRESULT
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmDriverAdd()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmDriverAdd LIB "msacm32.dll" ALIAS "acmDriverAddA" ( BYVAL phadid AS QUAD , BYVAL hinstModule AS QUAD , BYVAL lParam AS LONG , BYVAL dwPriority AS QUAD , BYVAL fdwAdd AS QUAD ) AS QUAD ' MMRESULT
DECLARE FUNCTION acmDriverAddW LIB "msacm32.dll" ALIAS "acmDriverAddW" ( BYVAL phadid AS QUAD , BYVAL hinstModule AS QUAD , BYVAL lParam AS LONG , BYVAL dwPriority AS QUAD , BYVAL fdwAdd AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_DRIVERADDF_NAME = &H00000001
%EQUATE `ACM_DRIVERADDF_FUNCTION = &H00000003 ' // lParam is a procedure
%EQUATE `ACM_DRIVERADDF_NOTIFYHWND = &H00000004 ' // lParam is notify hwnd
%EQUATE `ACM_DRIVERADDF_TYPEMASK = &H00000007 ' // driver type mask
%EQUATE `ACM_DRIVERADDF_LOCAL = &H00000000 ' // is local to current task
%EQUATE `ACM_DRIVERADDF_GLOBAL = &H00000008 ' // is global
'//
'// prototype for ACM driver procedures that are installed as _functions_
'// or _notifations_ instead of as a standalone installable driver.
'//
'typedef LRESULT (CALLBACK *ACMDRIVERPROC)(DWORD_PTR, HACMDRIVERID, UINT, LPARAM, LPARAM);
'typedef ACMDRIVERPROC FAR *LPACMDRIVERPROC;
'DECLARE FUNCTION ACMDRIVERPROC (BYVAL DWORD, BYVAL DWORD, BYVAL DWORD, BYVAL LONG, BYVAL LONG) AS LONG
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmDriverRemove()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmDriverRemove LIB "msacm32.dll" ALIAS "acmDriverRemove" ( BYVAL hadid AS QUAD , BYVAL fdwRemove AS QUAD ) AS QUAD ' MMRESULT
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmDriverOpen()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmDriverOpen LIB "msacm32.dll" ALIAS "acmDriverOpen" ( BYVAL phad AS QUAD , BYVAL hadid AS QUAD , BYVAL fdwOpen AS QUAD ) AS QUAD ' MMRESULT
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmDriverClose()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmDriverClose LIB "msacm32.dll" ALIAS "acmDriverClose" ( BYVAL had AS QUAD , BYVAL fdwClose AS QUAD ) AS QUAD ' MMRESULT
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmDriverMessage()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmDriverMessage LIB "msacm32.dll" ALIAS "acmDriverMessage" ( BYVAL had AS QUAD , BYVAL uMsg AS QUAD , BYVAL lParam1 AS LONG , BYVAL lParam2 AS LONG ) AS LONG ' LRESULT
'//
'//
'//
'//
%EQUATE `ACMDM_USER = %DRV_USER + &H0000
%EQUATE `ACMDM_RESERVED_LOW = %DRV_USER + &H2000
%EQUATE `ACMDM_RESERVED_HIGH = %DRV_USER + &H2FFF
%EQUATE `ACMDM_BASE = %ACMDM_RESERVED_LOW
%EQUATE `ACMDM_DRIVER_ABOUT = %ACMDM_BASE + 11
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmDriverPriority
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmDriverPriority LIB "msacm32.dll" ALIAS "acmDriverPriority" ( BYVAL hadid AS QUAD , BYVAL dwPriority AS QUAD , BYVAL fdwPriority AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_DRIVERPRIORITYF_ENABLE = &H00000001
%EQUATE `ACM_DRIVERPRIORITYF_DISABLE = &H00000002
%EQUATE `ACM_DRIVERPRIORITYF_ABLEMASK = &H00000003
%EQUATE `ACM_DRIVERPRIORITYF_BEGIN = &H00010000
%EQUATE `ACM_DRIVERPRIORITYF_END = &H00020000
%EQUATE `ACM_DRIVERPRIORITYF_DEFERMASK = &H00030000
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmDriverDetails()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// ACMDRIVERDETAILS
'//
'// the ACMDRIVERDETAILS structure is used to get various capabilities from
'// an ACM driver (codec, converter, filter).
'//
%EQUATE `ACMDRIVERDETAILS_SHORTNAME_CHARS = 32
%EQUATE `ACMDRIVERDETAILS_LONGNAME_CHARS = 128
%EQUATE `ACMDRIVERDETAILS_COPYRIGHT_CHARS = 80
%EQUATE `ACMDRIVERDETAILS_LICENSING_CHARS = 128
%EQUATE `ACMDRIVERDETAILS_FEATURES_CHARS = 512
' // Size = 920 bytes
TYPE tagACMDRIVERDETAILSA BYTE
 cbStruct AS DWORD ' DWORD // number of valid bytes in structure
 fccType AS DWORD ' FOURCC // compressor type 'audc'
 fccComp AS DWORD ' FOURCC // sub-type (not used; reserved)
 wMid AS WORD ' WORD // manufacturer id
 wPid AS WORD ' WORD // product id
 vdwACM AS DWORD ' DWORD // version of the ACM *compiled* for
 vdwDriver AS DWORD ' DWORD // version of the driver
 fdwSupport AS DWORD ' DWORD // misc. support flags
 cFormatTags AS DWORD ' DWORD // total unique format tags supported
 cFilterTags AS DWORD ' DWORD // total unique filter tags supported
 hicon AS DWORD ' HICON // handle to custom icon
 szShortName AS ASCIIZ * %ACMDRIVERDETAILS_SHORTNAME_CHARS ' char
 szLongName AS ASCIIZ * %ACMDRIVERDETAILS_LONGNAME_CHARS ' char
 szCopyright AS ASCIIZ * %ACMDRIVERDETAILS_COPYRIGHT_CHARS ' char
 szLicensing AS ASCIIZ * %ACMDRIVERDETAILS_LICENSING_CHARS ' char
 szFeatures AS ASCIIZ * %ACMDRIVERDETAILS_FEATURES_CHARS ' char
END TYPE
' // Size = 1800 bytes
TYPE tagACMDRIVERDETAILSW BYTE
 cbStruct AS DWORD ' DWORD // number of valid bytes in structure
 fccType AS DWORD ' FOURCC // compressor type 'audc'
 fccComp AS DWORD ' FOURCC // sub-type (not used; reserved)
 wMid AS WORD ' WORD // manufacturer id
 wPid AS WORD ' WORD // product id
 vdwACM AS DWORD ' DWORD // version of the ACM *compiled* for
 vdwDriver AS DWORD ' DWORD // version of the driver
 fdwSupport AS DWORD ' DWORD // misc. support flags
 cFormatTags AS DWORD ' DWORD // total unique format tags supported
 cFilterTags AS DWORD ' DWORD // total unique filter tags supported
 hicon AS DWORD ' HICON // handle to custom icon
 szShortName AS WSTRINGZ * %ACMDRIVERDETAILS_SHORTNAME_CHARS ' WCHAR
 szLongName AS WSTRINGZ * %ACMDRIVERDETAILS_LONGNAME_CHARS ' WCHAR
 szCopyright AS WSTRINGZ * %ACMDRIVERDETAILS_COPYRIGHT_CHARS ' WCHAR
 szLicensing AS WSTRINGZ * %ACMDRIVERDETAILS_LICENSING_CHARS ' WCHAR
 szFeatures AS WSTRINGZ * %ACMDRIVERDETAILS_FEATURES_CHARS ' WCHAR
END TYPE
#IF %DEF(%UNICODE)
 MACRO tagACMDRIVERDETAILS = tagACMDRIVERDETAILSW
#ELSE
 MACRO tagACMDRIVERDETAILS = tagACMDRIVERDETAILSA
#ENDIF
'//
'// ACMDRIVERDETAILS.fccType
'//
'// ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC: the FOURCC used in the fccType
'// field of the ACMDRIVERDETAILS structure to specify that this is an ACM
'// codec designed for audio.
'//
'//
'// ACMDRIVERDETAILS.fccComp
'//
'// ACMDRIVERDETAILS_FCCCOMP_UNDEFINED: the FOURCC used in the fccComp
'// field of the ACMDRIVERDETAILS structure. this is currently an unused
'// field.
'//
'#define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC mmioFOURCC('a', 'u', 'd', 'c')
'#define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED mmioFOURCC('\0', '\0', '\0', '\0')
%EQUATE `ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC = &H63647561
%EQUATE `ACMDRIVERDETAILS_FCCCOMP_UNDEFINED = 0
'//
'// the following flags are used to specify the type of conversion(s) that
'// the converter/codec/filter supports. these are placed in the fdwSupport
'// field of the ACMDRIVERDETAILS structure. note that a converter can
'// support one or more of these flags in any combination.
'//
'// ACMDRIVERDETAILS_SUPPORTF_CODEC: this flag is set if the driver supports
'// conversions from one format tag to another format tag. for example, if a
'// converter compresses WAVE_FORMAT_PCM to WAVE_FORMAT_ADPCM, then this bit
'// should be set.
'//
'// ACMDRIVERDETAILS_SUPPORTF_CONVERTER: this flags is set if the driver
'// supports conversions on the same format tag. as an example, the PCM
'// converter that is built into the ACM sets this bit (and only this bit)
'// because it converts only PCM formats (bits, sample rate).
'//
'// ACMDRIVERDETAILS_SUPPORTF_FILTER: this flag is set if the driver supports
'// transformations on a single format. for example, a converter that changed
'// the 'volume' of PCM data would set this bit. 'echo' and 'reverb' are
'// also filter types.
'//
'// ACMDRIVERDETAILS_SUPPORTF_HARDWARE: this flag is set if the driver supports
'// hardware input and/or output through a waveform device.
'//
'// ACMDRIVERDETAILS_SUPPORTF_ASYNC: this flag is set if the driver supports
'// async conversions.
'//
'//
'// ACMDRIVERDETAILS_SUPPORTF_LOCAL: this flag is set _by the ACM_ if a
'// driver has been installed local to the current task. this flag is also
'// set in the fdwSupport argument to the enumeration callback function
'// for drivers.
'//
'// ACMDRIVERDETAILS_SUPPORTF_DISABLED: this flag is set _by the ACM_ if a
'// driver has been disabled. this flag is also passed set in the fdwSupport
'// argument to the enumeration callback function for drivers.
'//
%EQUATE `ACMDRIVERDETAILS_SUPPORTF_CODEC = &H00000001
%EQUATE `ACMDRIVERDETAILS_SUPPORTF_CONVERTER = &H00000002
%EQUATE `ACMDRIVERDETAILS_SUPPORTF_FILTER = &H00000004
%EQUATE `ACMDRIVERDETAILS_SUPPORTF_HARDWARE = &H00000008
%EQUATE `ACMDRIVERDETAILS_SUPPORTF_ASYNC = &H00000010
%EQUATE `ACMDRIVERDETAILS_SUPPORTF_LOCAL = &H40000000
%EQUATE `ACMDRIVERDETAILS_SUPPORTF_DISABLED = &H80000000
DECLARE FUNCTION acmDriverDetails LIB "msacm32.dll" ALIAS "acmDriverDetailsA" ( BYVAL hadid AS QUAD , BYREF padd AS tagACMDRIVERDETAILSA , BYVAL fdwDetails AS QUAD ) AS QUAD ' MMRESULT
DECLARE FUNCTION acmDriverDetailsW LIB "msacm32.dll" ALIAS "acmDriverDetailsW" ( BYVAL hadid AS QUAD , BYREF padd AS tagACMDRIVERDETAILSW , BYVAL fdwDetails AS QUAD ) AS QUAD ' MMRESULT
'//--------------------------------------------------------------------------;
'//
'// ACM Format Tags
'//
'//
'//
'//
'//--------------------------------------------------------------------------;
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmFormatTagDetails()
'//
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
%EQUATE `ACMFORMATTAGDETAILS_FORMATTAG_CHARS = 48
' // Size = 72 bytes
TYPE tagACMFORMATTAGDETAILSA BYTE
 cbStruct AS DWORD
 dwFormatTagIndex AS DWORD
 dwFormatTag AS DWORD
 cbFormatSize AS DWORD
 fdwSupport AS DWORD
 cStandardFormats AS DWORD
 szFormatTag AS ASCIIZ * %ACMFORMATTAGDETAILS_FORMATTAG_CHARS ' char
END TYPE
' // Size = 120 bytes
TYPE tagACMFORMATTAGDETAILSW BYTE
 cbStruct AS DWORD
 dwFormatTagIndex AS DWORD
 dwFormatTag AS DWORD
 cbFormatSize AS DWORD
 fdwSupport AS DWORD
 cStandardFormats AS DWORD
 szFormatTag AS WSTRINGZ * %ACMFORMATTAGDETAILS_FORMATTAG_CHARS ' WCHAR
END TYPE
#IF %DEF(%UNICODE)
 MACRO tagACMFORMATTAGDETAILS = tagACMFORMATTAGDETAILSW
#ELSE
 MACRO tagACMFORMATTAGDETAILS = tagACMFORMATTAGDETAILSA
#ENDIF
DECLARE FUNCTION acmFormatTagDetails LIB "msacm32.dll" ALIAS "acmFormatTagDetailsA" ( BYVAL had AS QUAD , BYREF paftfd AS tagACMFORMATTAGDETAILSA , BYVAL fdwDetails AS QUAD ) AS QUAD ' MMRESULT
DECLARE FUNCTION acmFormatTagDetailsW LIB "msacm32.dll" ALIAS "acmFormatTagDetailsW" ( BYVAL had AS QUAD , BYREF paftfd AS tagACMFORMATTAGDETAILSW , BYVAL fdwDetails AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_FORMATTAGDETAILSF_INDEX = &H00000000
%EQUATE `ACM_FORMATTAGDETAILSF_FORMATTAG = &H00000001
%EQUATE `ACM_FORMATTAGDETAILSF_LARGESTSIZE = &H00000002
%EQUATE `ACM_FORMATTAGDETAILSF_QUERYMASK = &H0000000F
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmFormatTagEnum()
'//
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'#ifdef _WIN32
'typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBA)
'(
' HACMDRIVERID hadid,
' LPACMFORMATTAGDETAILSA paftd,
' DWORD_PTR dwInstance,
' DWORD fdwSupport
');
'DECLARE FUNCTION ACMFORMATTAGENUMCBA ( ' BYVAL hadid AS DWORD ' , BYREF paftd AS ACMFORMATTAGDETAILS ' , BYVAL dwInstance, ' , BYVAL fdwSupport ' ) AS DWORD
DECLARE FUNCTION acmFormatTagEnum LIB "msacm32.dll" ALIAS "acmFormatTagEnumA" ( BYVAL had AS QUAD , BYREF paftd AS tagACMFORMATTAGDETAILSA , BYVAL fnCallback AS QUAD , BYVAL dwInstance AS QUAD , BYVAL fdwEnum AS QUAD ) AS QUAD ' MMRESULT
'typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBW)
'(
' HACMDRIVERID hadid,
' LPACMFORMATTAGDETAILSW paftd,
' DWORD_PTR dwInstance,
' DWORD fdwSupport
');
'DECLARE FUNCTION ACMFORMATTAGENUMCBW ( ' BYVAL hadid AS DWORD ' , BYREF paftd AS ACMFORMATTAGDETAILSW ' , BYVAL dwInstance ' , BYVAL fdwSupport ' ) AS DWORD
DECLARE FUNCTION acmFormatTagEnumW LIB "msacm32.dll" ALIAS "acmFormatTagEnumW" ( BYVAL had AS QUAD , BYREF paftd AS tagACMFORMATTAGDETAILSW , BYVAL fnCallback AS QUAD , BYVAL dwInstance AS QUAD , BYVAL fdwEnum AS QUAD ) AS QUAD ' MMRESULT
'//--------------------------------------------------------------------------;
'//
'// ACM Formats
'//
'//
'//
'//
'//--------------------------------------------------------------------------;
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmFormatDetails()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
%EQUATE `ACMFORMATDETAILS_FORMAT_CHARS = 128
' // Size = 152 bytes
TYPE tagACMFORMATDETAILSA BYTE
 cbStruct AS DWORD
 dwFormatIndex AS DWORD
 dwFormatTag AS DWORD
 fdwSupport AS DWORD
 pwfx AS WAVEFORMATEX PTR
 cbwfx AS DWORD
 szFormat AS ASCIIZ * %ACMFORMATDETAILS_FORMAT_CHARS ' char
END TYPE
' // Size = 280 bytes
TYPE tagACMFORMATDETAILSW BYTE
 cbStruct AS DWORD
 dwFormatIndex AS DWORD
 dwFormatTag AS DWORD
 fdwSupport AS DWORD
 pwfx AS WAVEFORMATEX PTR
 cbwfx AS DWORD
 szFormat AS WSTRINGZ * %ACMFORMATDETAILS_FORMAT_CHARS ' WCHAR
END TYPE
#IF %DEF(%UNICODE)
 MACRO tagACMFORMATDETAILS = tagACMFORMATDETAILSW
#ELSE
 MACRO tagACMFORMATDETAILS = tagACMFORMATDETAILSA
#ENDIF
DECLARE FUNCTION acmFormatDetails LIB "msacm32.dll" ALIAS "acmFormatDetails" ( BYVAL had AS QUAD , BYREF pafd AS tagACMFORMATDETAILSA , BYVAL fdwDetails AS QUAD ) AS QUAD ' MMRESULT
DECLARE FUNCTION acmFormatDetailsW LIB "msacm32.dll" ALIAS "acmFormatDetailsW" ( BYVAL had AS QUAD , BYREF pafd AS tagACMFORMATDETAILSW , BYVAL fdwDetails AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_FORMATDETAILSF_INDEX = &H00000000
%EQUATE `ACM_FORMATDETAILSF_FORMAT = &H00000001
%EQUATE `ACM_FORMATDETAILSF_QUERYMASK = &H0000000F
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmFormatEnum()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'#ifdef _WIN32
'typedef BOOL (CALLBACK *ACMFORMATENUMCBA)
'(
' HACMDRIVERID hadid,
' LPACMFORMATDETAILSA pafd,
' DWORD_PTR dwInstance,
' DWORD fdwSupport
');
'DECLARE FUNCTION ACMFORMATENUMCBA ( ' BYVAL hadid AS DWORD ' , BYREF pafd AS PACMFORMATDETAILS ' , BYVAL dwInstance AS DWORD ' , BYVAL fdwSupport AS DWORD ' ) AS LONG
DECLARE FUNCTION acmFormatEnum LIB "msacm32.dll" ALIAS "acmFormatEnumA" ( BYVAL had AS QUAD , BYREF pafd AS tagACMFORMATDETAILSA , BYVAL fnCallback AS QUAD , BYVAL dwInstance AS QUAD , BYVAL fdwEnum AS QUAD ) AS QUAD ' MMRESULT
'typedef BOOL (CALLBACK *ACMFORMATENUMCBW)
'(
' HACMDRIVERID hadid,
' LPACMFORMATDETAILSW pafd,
' DWORD_PTR dwInstance,
' DWORD fdwSupport
');
'DECLARE FUNCTION ACMFORMATENUMCBW ( ' BYVAL hadid AS DWORD ' , BYREF pafd AS PACMFORMATDETAILSW ' , BYVAL dwInstance AS DWORD ' , BYVAL fdwSupport AS DWORD ' ) AS LONG
DECLARE FUNCTION acmFormatEnumW LIB "msacm32.dll" ALIAS "acmFormatEnumW" ( BYVAL had AS QUAD , BYREF pafd AS tagACMFORMATDETAILSW , BYVAL fnCallback AS QUAD , BYVAL dwInstance AS QUAD , BYVAL fdwEnum AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_FORMATENUMF_WFORMATTAG = &H00010000
%EQUATE `ACM_FORMATENUMF_NCHANNELS = &H00020000
%EQUATE `ACM_FORMATENUMF_NSAMPLESPERSEC = &H00040000
%EQUATE `ACM_FORMATENUMF_WBITSPERSAMPLE = &H00080000
%EQUATE `ACM_FORMATENUMF_CONVERT = &H00100000
%EQUATE `ACM_FORMATENUMF_SUGGEST = &H00200000
%EQUATE `ACM_FORMATENUMF_HARDWARE = &H00400000
%EQUATE `ACM_FORMATENUMF_INPUT = &H00800000
%EQUATE `ACM_FORMATENUMF_OUTPUT = &H01000000
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmFormatSuggest()
'//
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmFormatSuggest LIB "msacm32.dll" ALIAS "acmFormatSuggest" ( BYVAL had AS QUAD , BYREF pwfxSrc AS WAVEFORMATEX , BYREF pwfxDst AS WAVEFORMATEX , BYVAL cbwfxDst AS QUAD , BYVAL fdwSuggest AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_FORMATSUGGESTF_WFORMATTAG = &H00010000
%EQUATE `ACM_FORMATSUGGESTF_NCHANNELS = &H00020000
%EQUATE `ACM_FORMATSUGGESTF_NSAMPLESPERSEC = &H00040000
%EQUATE `ACM_FORMATSUGGESTF_WBITSPERSAMPLE = &H00080000
%EQUATE `ACM_FORMATSUGGESTF_TYPEMASK = &H00FF0000
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmFormatChoose()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'#ifdef _WIN32
'#define ACMHELPMSGSTRINGA "acmchoose_help"
'#define ACMHELPMSGSTRINGW L"acmchoose_help"
'#define ACMHELPMSGCONTEXTMENUA "acmchoose_contextmenu"
'#define ACMHELPMSGCONTEXTMENUW L"acmchoose_contextmenu"
'#define ACMHELPMSGCONTEXTHELPA "acmchoose_contexthelp"
'#define ACMHELPMSGCONTEXTHELPW L"acmchoose_contexthelp"
'#ifdef _UNICODE
'#define ACMHELPMSGSTRING ACMHELPMSGSTRINGW
'#define ACMHELPMSGCONTEXTMENU ACMHELPMSGCONTEXTMENUW
'#define ACMHELPMSGCONTEXTHELP ACMHELPMSGCONTEXTHELPW
'#else
'#define ACMHELPMSGSTRING ACMHELPMSGSTRINGA
'#define ACMHELPMSGCONTEXTMENU ACMHELPMSGCONTEXTMENUA
'#define ACMHELPMSGCONTEXTHELP ACMHELPMSGCONTEXTHELPA
'#endif
'#else
'#define ACMHELPMSGSTRING "acmchoose_help"
'#define ACMHELPMSGCONTEXTMENU "acmchoose_contextmenu"
'#define ACMHELPMSGCONTEXTHELP "acmchoose_contexthelp"
'#endif
$ACMHELPMSGSTRINGA = "acmchoose_help"
$ACMHELPMSGCONTEXTMENUA = "acmchoose_contextmenu"
$ACMHELPMSGCONTEXTHELPA = "acmchoose_contexthelp"
'//
'// MM_ACM_FORMATCHOOSE is sent to hook callbacks by the Format Chooser
'// Dialog...
'//
%EQUATE `MM_ACM_FORMATCHOOSE = &H8000
%EQUATE `FORMATCHOOSE_MESSAGE = 0
%EQUATE `FORMATCHOOSE_FORMATTAG_VERIFY = %FORMATCHOOSE_MESSAGE + 0
%EQUATE `FORMATCHOOSE_FORMAT_VERIFY = %FORMATCHOOSE_MESSAGE + 1
%EQUATE `FORMATCHOOSE_CUSTOM_VERIFY = %FORMATCHOOSE_MESSAGE + 2
'typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCA)
'(
' HWND hwnd,
' UINT uMsg,
' WPARAM wParam,
' LPARAM lParam
');
'DECLARE FUNCTION ACMFORMATCHOOSEHOOKPROCA ( ' BYVAL hwnd AS DWORD, ' BYVAL uMsg AS DWORD, ' BYVAL wParam AS DWORD, ' BYVAL lParam AS LONG ' ) AS DWORD
'typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCW)
'(
' HWND hwnd,
' UINT uMsg,
' WPARAM wParam,
' LPARAM lParam
');
'DECLARE FUNCTION ACMFORMATCHOOSEHOOKPROCW ( ' BYVAL hwnd AS DWORD, ' BYVAL uMsg AS DWORD, ' BYVAL wParam AS DWORD, ' BYVAL lParam AS LONG ' ) AS DWORD
'//
'//
'//
'//
' // Size = 232 bytes
TYPE tagACMFORMATCHOOSEA BYTE
 cbStruct AS DWORD
 fdwStyle AS DWORD
 hwndOwner AS DWORD
 pwfx AS WAVEFORMATEX PTR
 cbwfx AS DWORD
 pszTitle AS ASCIIZ PTR
 szFormatTag AS ASCIIZ * %ACMFORMATTAGDETAILS_FORMATTAG_CHARS ' char
 szFormat AS ASCIIZ * %ACMFORMATDETAILS_FORMAT_CHARS ' char
 pszName AS ASCIIZ PTR
 cchName AS DWORD
 fdwEnum AS DWORD
 pwfxEnum AS WAVEFORMATEX PTR
 hInstance AS DWORD ' HINSTANCE
 pszTemplateName AS ASCIIZ PTR
 lCustData AS LONG
 pfnHook AS DWORD ' ACMFORMATCHOOSEHOOKPROCA
END TYPE
' // Size = 408 bytes
TYPE tagACMFORMATCHOOSEW BYTE
 cbStruct AS DWORD
 fdwStyle AS DWORD
 hwndOwner AS DWORD
 pwfx AS WAVEFORMATEX PTR
 cbwfx AS DWORD
 pszTitle AS WSTRINGZ PTR
 szFormatTag AS WSTRINGZ * %ACMFORMATTAGDETAILS_FORMATTAG_CHARS ' WCHAR
 szFormat AS WSTRINGZ * %ACMFORMATDETAILS_FORMAT_CHARS ' WCHAR
 pszName AS WSTRINGZ PTR
 cchName AS DWORD
 fdwEnum AS DWORD
 pwfxEnum AS WAVEFORMATEX PTR
 hInstance AS DWORD ' HINSTANCE
 pszTemplateName AS WSTRINGZ PTR
 lCustData AS LONG
 pfnHook AS DWORD ' ACMFORMATCHOOSEHOOKPROCW
END TYPE
#IF %DEF(%UNICODE)
 MACRO tagACMFORMATCHOOSE = tagACMFORMATCHOOSEW
#ELSE
 MACRO tagACMFORMATCHOOSE = tagACMFORMATCHOOSEA
#ENDIF
'//
'// ACMFORMATCHOOSE.fdwStyle
'//
'//
'//
%EQUATE `ACMFORMATCHOOSE_STYLEF_SHOWHELP = &H00000004
%EQUATE `ACMFORMATCHOOSE_STYLEF_ENABLEHOOK = &H00000008
%EQUATE `ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE = &H00000010
%EQUATE `ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE = &H00000020
%EQUATE `ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT = &H00000040
%EQUATE `ACMFORMATCHOOSE_STYLEF_CONTEXTHELP = &H00000080
DECLARE FUNCTION acmFormatChoose LIB "msacm32.dll" ALIAS "acmFormatChooseA" ( BYREF pafmtc AS tagACMFORMATCHOOSEA ) AS QUAD ' MMRESULT
DECLARE FUNCTION acmFormatChooseW LIB "msacm32.dll" ALIAS "acmFormatChooseW" ( BYREF pafmtc AS tagACMFORMATCHOOSEW ) AS QUAD ' MMRESULT
'//--------------------------------------------------------------------------;
'//
'// ACM Filter Tags
'//
'//
'//
'//
'//--------------------------------------------------------------------------;
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmFilterTagDetails()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
%EQUATE `ACMFILTERTAGDETAILS_FILTERTAG_CHARS = 48
' // Size = 72 bytes
TYPE tagACMFILTERTAGDETAILSA BYTE
 cbStruct AS DWORD
 dwFilterTagIndex AS DWORD
 dwFilterTag AS DWORD
 cbFilterSize AS DWORD
 fdwSupport AS DWORD
 cStandardFilters AS DWORD
 szFilterTag AS ASCIIZ * %ACMFILTERTAGDETAILS_FILTERTAG_CHARS ' char
END TYPE
' // Size = 120 bytes
TYPE tagACMFILTERTAGDETAILSW BYTE
 cbStruct AS DWORD
 dwFilterTagIndex AS DWORD
 dwFilterTag AS DWORD
 cbFilterSize AS DWORD
 fdwSupport AS DWORD
 cStandardFilters AS DWORD
 szFilterTag AS WSTRINGZ * %ACMFILTERTAGDETAILS_FILTERTAG_CHARS ' WCHAR
END TYPE
#IF %DEF(%UNICODE)
 MACRO tagACMFILTERTAGDETAILS = tagACMFILTERTAGDETAILSW
#ELSE
 MACRO tagACMFILTERTAGDETAILS = tagACMFILTERTAGDETAILSA
#ENDIF
DECLARE FUNCTION acmFilterTagDetails LIB "msacm32.dll" ALIAS "acmFilterTagDetailsA" ( BYVAL had AS QUAD , BYREF paftd AS tagACMFILTERTAGDETAILSA , BYVAL fdwDetails AS QUAD ) AS QUAD ' MMRESULT
DECLARE FUNCTION acmFilterTagDetailsW LIB "msacm32.dll" ALIAS "acmFilterTagDetailsW" ( BYVAL had AS QUAD , BYREF paftd AS tagACMFILTERTAGDETAILSW , BYVAL fdwDetails AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_FILTERTAGDETAILSF_INDEX = &H00000000
%EQUATE `ACM_FILTERTAGDETAILSF_FILTERTAG = &H00000001
%EQUATE `ACM_FILTERTAGDETAILSF_LARGESTSIZE = &H00000002
%EQUATE `ACM_FILTERTAGDETAILSF_QUERYMASK = &H0000000F
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmFilterTagEnum()
'//
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'#ifdef _WIN32
'typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBA)
'(
' HACMDRIVERID hadid,
' LPACMFILTERTAGDETAILSA paftd,
' DWORD_PTR dwInstance,
' DWORD fdwSupport
');
DECLARE FUNCTION acmFilterTagEnum LIB "msacm32.dll" ALIAS "acmFilterTagEnumA" ( BYVAL had AS QUAD , BYREF paftd AS tagACMFILTERTAGDETAILSA , BYVAL fnCallback AS QUAD , BYVAL dwInstance AS QUAD , BYVAL fdwEnum AS QUAD ) AS QUAD ' MMRESULT
'typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBW)
'(
' HACMDRIVERID hadid,
' LPACMFILTERTAGDETAILSW paftd,
' DWORD_PTR dwInstance,
' DWORD fdwSupport
');
'DECLARE FUNCTION ACMFILTERTAGENUMCBW ( ' BYVAL hadid AS DWORD, ' BYREF paftd AS tagACMFILTERTAGDETAILSW, ' BYVAL dwInstance AS DWORD, ' BYVAL fdwSupport AS DWORD ' ) AS LONG
DECLARE FUNCTION acmFilterTagEnumW LIB "msacm32.dll" ALIAS "acmFilterTagEnumW" ( BYVAL had AS QUAD , BYREF paftd AS tagACMFILTERTAGDETAILSW , BYVAL fnCallback AS QUAD , BYVAL dwInstance AS QUAD , BYVAL fdwEnum AS QUAD ) AS QUAD ' MMRESULT
'MMRESULT ACMAPI acmFilterTagEnum
'(
' HACMDRIVER had,
' LPACMFILTERTAGDETAILS paftd,
' ACMFILTERTAGENUMCB fnCallback,
' DWORD_PTR dwInstance,
' DWORD fdwEnum
');
'#endif
'//--------------------------------------------------------------------------;
'//
'// ACM Filters
'//
'//
'//
'//
'//--------------------------------------------------------------------------;
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmFilterDetails()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
%EQUATE `ACMFILTERDETAILS_FILTER_CHARS = 128
' // Size = 152 bytes
TYPE tagACMFILTERDETAILSA BYTE
 cbStruct AS DWORD
 dwFilterIndex AS DWORD
 dwFilterTag AS DWORD
 fdwSupport AS DWORD
 pwfltr AS WAVEFILTER PTR
 cbwfltr AS DWORD
 szFilter AS ASCIIZ * %ACMFILTERDETAILS_FILTER_CHARS ' char
END TYPE
' // Size = 280 bytes
TYPE tagACMFILTERDETAILSW BYTE
 cbStruct AS DWORD
 dwFilterIndex AS DWORD
 dwFilterTag AS DWORD
 fdwSupport AS DWORD
 pwfltr AS WAVEFILTER PTR
 cbwfltr AS DWORD
 szFilter AS WSTRINGZ * %ACMFILTERDETAILS_FILTER_CHARS ' WCHAR
END TYPE
#IF %DEF(%UNICODE)
 MACRO tagACMFILTERDETAILS = tagACMFILTERDETAILSW
#ELSE
 MACRO tagACMFILTERDETAILS = tagACMFILTERDETAILSA
#ENDIF
DECLARE FUNCTION acmFilterDetails LIB "msacm32.dll" ALIAS "acmFilterDetailsA" ( BYVAL had AS QUAD , BYREF tagACMFILTERDETAILSA , BYVAL pafd AS QUAD ) AS QUAD ' MMRESULT
DECLARE FUNCTION acmFilterDetailsW LIB "msacm32.dll" ALIAS "acmFilterDetailsW" ( BYVAL had AS QUAD , BYREF pafd AS tagACMFILTERDETAILSW , BYVAL fdwDetails AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_FILTERDETAILSF_INDEX = &H00000000
%EQUATE `ACM_FILTERDETAILSF_FILTER = &H00000001
%EQUATE `ACM_FILTERDETAILSF_QUERYMASK = &H0000000F
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmFilterEnum()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'#ifdef _WIN32
'typedef BOOL (CALLBACK *ACMFILTERENUMCBA)
'(
' HACMDRIVERID hadid,
' LPACMFILTERDETAILSA pafd,
' DWORD_PTR dwInstance,
' DWORD fdwSupport
');
'DECLARE FUNCTION ACMFILTERENUMCBA ( ' BYVAL hadid AS DWORD ' , BYREF pafd AS tagACMFILTERDETAILS ' , BYVAL dwInstance AS DWORD ' , BYVAL fdwSupport AS DWORD ' ) AS LONG
DECLARE FUNCTION acmFilterEnum LIB "msacm32.dll" ALIAS "acmFilterEnumA" ( BYVAL had AS QUAD , BYREF pafd AS tagACMFILTERDETAILSA , BYVAL fnCallback AS QUAD , BYVAL dwInstance AS QUAD , BYVAL fdwEnum AS QUAD ) AS QUAD ' MMRESULT
'typedef BOOL (CALLBACK *ACMFILTERENUMCBW)
'(
' HACMDRIVERID hadid,
' LPACMFILTERDETAILSW pafd,
' DWORD_PTR dwInstance,
' DWORD fdwSupport
');
'DECLARE FUNCTION ACMFILTERENUMCBW ( ' BYVAL hadid AS DWORD ' , BYREF pafd AS tagACMFILTERDETAILSW ' , BYVAL dwInstance AS DWORD ' , BYVAL fdwSupport AS DWORD ' ) AS LONG
DECLARE FUNCTION acmFilterEnumW LIB "msacm32.dll" ALIAS "acmFilterEnumW" ( BYVAL had AS QUAD , BYREF pafd AS tagACMFILTERDETAILSW , BYVAL fnCallback AS QUAD , BYVAL dwInstance AS QUAD , BYVAL fdwEnum AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_FILTERENUMF_DWFILTERTAG = &H00010000
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmFilterChoose()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// MM_ACM_FILTERCHOOSE is sent to hook callbacks by the Filter Chooser
'// Dialog...
'//
%EQUATE `MM_ACM_FILTERCHOOSE = &H8000
%EQUATE `FILTERCHOOSE_MESSAGE = 0
%EQUATE `FILTERCHOOSE_FILTERTAG_VERIFY = %FILTERCHOOSE_MESSAGE + 0
%EQUATE `FILTERCHOOSE_FILTER_VERIFY = %FILTERCHOOSE_MESSAGE + 1
%EQUATE `FILTERCHOOSE_CUSTOM_VERIFY = %FILTERCHOOSE_MESSAGE + 2
'#ifdef _WIN32
'typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCA)
'(
' HWND hwnd,
' UINT uMsg,
' WPARAM wParam,
' LPARAM lParam
');
'DECLARE FUNCTION ACMFILTERCHOOSEHOOKPROCA ( ' BYVAL hwnd AS DWORD, ' BYVAL uMsg AS DWORD, ' BYVAL wParam AS DWORD, ' BYVAL lParam AS LONG ' ) AS DWORD
'typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCW)
'(
' HWND hwnd,
' UINT uMsg,
' WPARAM wParam,
' LPARAM lParam
');
'DECLARE FUNCTION ACMFILTERCHOOSEHOOKPROCW ( ' BYVAL hwnd AS DWORD, ' BYVAL uMsg AS DWORD, ' BYVAL wParam AS DWORD, ' BYVAL lParam AS LONG ' ) AS DWORD
'//
'// ACMFILTERCHOOSE
'//
'//
' // Size = 232 bytes
TYPE tagACMFILTERCHOOSEA BYTE
 cbStruct AS DWORD
 fdwStyle AS DWORD
 hwndOwner AS DWORD
 pwfltr AS WAVEFILTER PTR
 cbwfltr AS DWORD
 pszTitle AS ASCIIZ PTR
 szFilterTag AS ASCIIZ * %ACMFILTERTAGDETAILS_FILTERTAG_CHARS ' char
 szFilter AS ASCIIZ * %ACMFILTERDETAILS_FILTER_CHARS ' char
 pszName AS ASCIIZ PTR
 cchName AS DWORD
 fdwEnum AS DWORD
 pwfltrEnum AS WAVEFILTER PTR
 hInstance AS DWORD ' HINSTANCE
 pszTemplateName AS ASCIIZ PTR
 lCustData AS LONG
 pfnHook AS DWORD ' ACMFILTERCHOOSEHOOKPROCA
END TYPE
' // Size = 408 bytes
TYPE tagACMFILTERCHOOSEW BYTE
 cbStruct AS DWORD
 fdwStyle AS DWORD
 hwndOwner AS DWORD
 pwfltr AS WAVEFILTER PTR
 cbwfltr AS DWORD
 pszTitle AS WSTRINGZ PTR
 szFilterTag AS WSTRINGZ * %ACMFILTERTAGDETAILS_FILTERTAG_CHARS ' WCHAR
 szFilter AS WSTRINGZ * %ACMFILTERDETAILS_FILTER_CHARS ' WCHAR
 pszName AS WSTRINGZ PTR
 cchName AS DWORD
 fdwEnum AS DWORD
 pwfltrEnum AS WAVEFILTER PTR
 hInstance AS DWORD ' HINSTANCE
 pszTemplateName AS WSTRINGZ PTR
 lCustData AS LONG
 pfnHook AS DWORD ' ACMFILTERCHOOSEHOOKPROCW
END TYPE
#IF %DEF(%UNICODE)
 MACRO tagACMFILTERCHOOSE = tagACMFILTERCHOOSEW
#ELSE
 MACRO tagACMFILTERCHOOSE = tagACMFILTERCHOOSEA
#ENDIF
'//
'// ACMFILTERCHOOSE.fdwStyle
'//
'//
%EQUATE `ACMFILTERCHOOSE_STYLEF_SHOWHELP = &H00000004
%EQUATE `ACMFILTERCHOOSE_STYLEF_ENABLEHOOK = &H00000008
%EQUATE `ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE = &H00000010
%EQUATE `ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE = &H00000020
%EQUATE `ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT = &H00000040
%EQUATE `ACMFILTERCHOOSE_STYLEF_CONTEXTHELP = &H00000080
DECLARE FUNCTION acmFilterChooseA LIB "msacm32.dll" ALIAS "acmFilterChoose" ( BYREF pafltrc AS tagACMFILTERCHOOSEA ) AS QUAD ' MMRESULT
DECLARE FUNCTION acmFilterChooseW LIB "msacm32.dll" ALIAS "acmFilterChooseW" ( BYREF pafltrc AS tagACMFILTERCHOOSEW ) AS QUAD ' MMRESULT
#IF %DEF(%UNICODE)
 MACRO acmFilterChoose = acmFilterChooseW
#ELSE
 MACRO acmFilterChoose = acmFilterChooseA
#ENDIF
'//--------------------------------------------------------------------------;
'//
'// ACM Stream API's
'//
'//
'//
'//--------------------------------------------------------------------------;
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmStreamOpen()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'#ifdef _WIN64
'#define _DRVRESERVED 15
'#else
'#define _DRVRESERVED 10
'#endif // _WIN64
%EQUATE `DRVRESERVED = 10
' // Size = 84 bytes
TYPE tagACMSTREAMHEADER BYTE
 cbStruct AS DWORD
 fdwStatus AS DWORD
 dwUser AS DWORD ' DWORD_PTR
 pbSrc AS BYTE PTR
 cbSrcLength AS DWORD
 cbSrcLengthUsed AS DWORD
 dwSrcUser AS DWORD ' DWORD_PTR
 pbDst AS BYTE PTR
 cbDstLength AS DWORD
 cbDstLengthUsed AS DWORD
 dwDstUser AS DWORD ' DWORD_PTR
 dwReservedDriver(%DRVRESERVED - 1) AS DWORD
END TYPE
'//
'// ACMSTREAMHEADER.fdwStatus
'//
'// ACMSTREAMHEADER_STATUSF_DONE: done bit for async conversions.
'//
%EQUATE `ACMSTREAMHEADER_STATUSF_DONE = &H00010000
%EQUATE `ACMSTREAMHEADER_STATUSF_PREPARED = &H00020000
%EQUATE `ACMSTREAMHEADER_STATUSF_INQUEUE = &H00100000
DECLARE FUNCTION acmStreamOpen LIB "msacm32.dll" ALIAS "acmStreamOpen" ( BYVAL phas AS QUAD , BYVAL had AS QUAD , BYREF pwfxSrc AS WAVEFORMATEX , BYREF pwfxDst AS WAVEFORMATEX , BYREF pwfltr AS WAVEFILTER , BYVAL dwCallback AS QUAD , BYVAL dwInstance AS QUAD , BYVAL fdwOpen AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_STREAMOPENF_QUERY = &H00000001
%EQUATE `ACM_STREAMOPENF_ASYNC = &H00000002
%EQUATE `ACM_STREAMOPENF_NONREALTIME = &H00000004
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmStreamClose()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmStreamClose LIB "msacm32.dll" ALIAS "acmStreamClose" ( BYVAL has AS QUAD , BYVAL fdwClose AS QUAD ) AS QUAD ' MMRESULT
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmStreamSize()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmStreamSize LIB "msacm32.dll" ALIAS "acmStreamSize" ( BYVAL has AS QUAD , BYVAL cbInput AS QUAD , BYREF pdwOutputBytes AS QUAD , BYVAL fdwSize AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_STREAMSIZEF_SOURCE = &H00000000
%EQUATE `ACM_STREAMSIZEF_DESTINATION = &H00000001
%EQUATE `ACM_STREAMSIZEF_QUERYMASK = &H0000000F
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmStreamReset()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmStreamReset LIB "msacm32.dll" ALIAS "acmStreamReset" ( BYVAL has AS QUAD , BYVAL fdwReset AS QUAD ) AS QUAD ' MMRESULT
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmStreamMessage()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmStreamMessage LIB "msacm32.dll" ALIAS "acmStreamMessage" ( BYVAL has AS QUAD , BYVAL uMsg AS QUAD , BYVAL lParam1 AS LONG , BYVAL lParam2 AS QUAD ) AS QUAD ' MMRESULT
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmStreamConvert()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmStreamConvert LIB "msacm32.dll" ALIAS "acmStreamConvert" ( BYVAL has AS QUAD , BYREF pash AS tagACMSTREAMHEADER , BYVAL fdwConvert AS QUAD ) AS QUAD ' MMRESULT
%EQUATE `ACM_STREAMCONVERTF_BLOCKALIGN = &H00000004
%EQUATE `ACM_STREAMCONVERTF_START = &H00000010
%EQUATE `ACM_STREAMCONVERTF_END = &H00000020
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmStreamPrepareHeader()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmStreamPrepareHeader LIB "msacm32.dll" ALIAS "acmStreamPrepareHeader" ( BYVAL has AS QUAD , BYREF pash AS tagACMSTREAMHEADER , BYVAL fdwPrepare AS QUAD ) AS QUAD ' MMRESULT
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
'//
'// acmStreamUnprepareHeader()
'//
'//
'//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DECLARE FUNCTION acmStreamUnprepareHeader LIB "msacm32.dll" ALIAS "acmStreamUnprepareHeader" ( BYVAL has AS QUAD , BYREF pash AS tagACMSTREAMHEADER , BYVAL fdwUnprepare AS QUAD ) AS QUAD ' MMRESULT
#ENDIF
