IncludeAPIs msacm32 ;Windows Audio Compression Manager - for MP3 and other compressions Find_Desired_Codec proto :dword,:dword,:dword ;An absolute crapload of stuff missing from MSACM32 ACMERR_BASE equ 512 ACMERR_NOTPOSSIBLE equ ACMERR_BASE + 0 ACMERR_BUSY equ ACMERR_BASE + 1 ACMERR_UNPREPARED equ ACMERR_BASE + 2 ACMERR_CANCELED equ ACMERR_BASE + 3 ACMDRIVERDETAILS_SHORTNAME_CHARS equ 32 ACMDRIVERDETAILS_LONGNAME_CHARS equ 128 ACMDRIVERDETAILS_COPYRIGHT_CHARS equ 80 ACMDRIVERDETAILS_LICENSING_CHARS equ 128 ACMDRIVERDETAILS_FEATURES_CHARS equ 512 ACMDRIVERDETAILS_SUPPORTF_CODEC equ 1 ACMDRIVERDETAILS_SUPPORTF_CONVERTER equ 2 ACMDRIVERDETAILS_SUPPORTF_FILTER equ 4 ACMDRIVERDETAILS_SUPPORTF_HARDWARE equ 8 ACMDRIVERDETAILS_SUPPORTF_ASYNC equ 16 ACMDRIVERDETAILS_SUPPORTF_LOCAL equ 40000000h ACMDRIVERDETAILS_SUPPORTF_DISABLED equ 80000000h ACMFORMATTAGDETAILS_FORMATTAG_CHARS equ 48 ACM_FORMATTAGDETAILSF_INDEX equ 0 ACM_FORMATTAGDETAILSF_FORMATTAG equ 1 ACM_FORMATTAGDETAILSF_LARGESTSIZE equ 2 ACM_FORMATTAGDETAILSF_QUERYMASK equ 0Fh ACM_METRIC_COUNT_CODECS equ 2 ACM_METRIC_COUNT_CONVERTERS equ 3 ACM_METRIC_COUNT_FILTERS equ 4 ACM_METRIC_COUNT_DISABLED equ 5 ACM_METRIC_COUNT_HARDWARE equ 6 ACM_METRIC_COUNT_LOCAL_DRIVERS equ 20 ACM_METRIC_COUNT_LOCAL_CODECS equ 21 ACM_METRIC_COUNT_LOCAL_CONVERTERS equ 22 ACM_METRIC_COUNT_LOCAL_FILTERS equ 23 ACM_METRIC_COUNT_LOCAL_DISABLED equ 24 ACM_METRIC_HARDWARE_WAVE_INPUT equ 30 ACM_METRIC_HARDWARE_WAVE_OUTPUT equ 31 ACM_METRIC_MAX_SIZE_FORMAT equ 50 ACM_METRIC_MAX_SIZE_FILTER equ 51 ACM_METRIC_DRIVER_SUPPORT equ 100 ACM_METRIC_DRIVER_PRIORITY equ 101 ACM_STREAMSIZEF_SOURCE equ 0 ACM_STREAMSIZEF_DESTINATION equ 1 ACM_STREAMCONVERTF_BLOCKALIGN equ 4 ACM_STREAMCONVERTF_START equ 16 ACM_STREAMCONVERTF_END equ 32 ACMSTREAMHEADER_STATUSF_DONE equ 00010000h ACMSTREAMHEADER_STATUSF_PREPARED equ 00020000h WAVE_FORMAT_MPEGLAYER3 equ 55h MPEGLAYER3_WFX_EXTRA_BYTES equ 12 MPEGLAYER3_FLAG_PADDING_ISO equ 0 MPEGLAYER3_FLAG_PADDING_ON equ 1 MPEGLAYER3_FLAG_PADDING_OFF equ 2 MPEGLAYER3_ID_UNKNOWN equ 0 MPEGLAYER3_ID_MPEG equ 1 MPEGLAYER3_ID_CONSTANTFRAMESIZE equ 2 MP3_BLOCK_SIZE equ 2135 TRUESPEECH_FORMAT equ 22h TRUESPEECH_CBSIZE equ 32 ;ACM Tags for OGG VORBIS TAG_VORBIS_MODE_1 equ 674fh TAG_VORBIS_MODE_2 equ 6750h TAG_VORBIS_MODE_3 equ 6751h TAG_VORBIS_MODE_01 equ 676fh ;mode "1+" TAG_VORBIS_MODE_02 equ 6770h TAG_VORBIS_MODE_03 equ 6771h ACMDRIVERDETAILS struct cbStruct dd ? fccType dd ? fccComp dd ? wMid word ? wPid word ? vdwACM dd ? vdwDriver dd ? fdwSupport dd ? cFormatTags dd ? cFilterTags dd ? hicon HICON ? szShortName db ACMDRIVERDETAILS_SHORTNAME_CHARS dup (?) szLongName db ACMDRIVERDETAILS_LONGNAME_CHARS dup (?) szCopyright db ACMDRIVERDETAILS_COPYRIGHT_CHARS dup (?) szLicensing db ACMDRIVERDETAILS_LICENSING_CHARS dup (?) szFeatures db ACMDRIVERDETAILS_FEATURES_CHARS dup (?) ACMDRIVERDETAILS ends ACMFORMATTAGDETAILS struct cbStruct dd ? dwFormatTagIndex dd ? dwFormatTag dd ? cbFormatSize dd ? fdwSupport dd ? cStandardFormats dd ? szFormatTag db ACMFORMATTAGDETAILS_FORMATTAG_CHARS dup (?) ACMFORMATTAGDETAILS ends ACMSTREAMHEADER struct cbStruct dd ? fdwStatus dd ? dwUser dd ? pbSrc dd ? cbSrcLength dd ? cbSrcLengthUsed dd ? dwSrcUser dd ? pbDst dd ? cbDstLength dd ? cbDstLengthUsed dd ? dwDstUser dd ? dwReservedDriver dd 10 dup (?) ACMSTREAMHEADER ends MPEGLAYER3WAVEFORMAT struct wfx WAVEFORMATEX <> wID word ? fdwFlags dd ? nBlockSize word ? nFramesPerBlock word ? nCodecDelay word ? MPEGLAYER3WAVEFORMAT ends WAVEFORMATEX2 struct WAVEFORMATEX <> bonus db TRUESPEECH_CBSIZE dup (?) WAVEFORMATEX2 ends .data Default_Wave_Format_For_MP3_Input MPEGLAYER3WAVEFORMAT <, MPEGLAYER3_ID_MPEG, MPEGLAYER3_FLAG_PADDING_OFF, MP3_BLOCK_SIZE,1,1393> Preferred_Wave_Format_For_MP3_PlayBack WAVEFORMATEX Preferred_Wave_Format_For_MP3_Recording WAVEFORMATEX Preferred_Wave_Format_For_TrueSpeech WAVEFORMATEX2 <,<>> ;Table of BitRates for MPEG frames v1L1 dw 0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1 v1L2 dw 0,32,48,56,64 ,80 ,96 ,112,128,160,192,224,256,320,384,-1 v1L3 dw 0,32,40,48,56 ,64 ,80 ,96 ,112,128,160,192,224,256,320,-1 v2L1 dw 0,32,48,56,64 ,80 ,96 ,112,128,144,160,176,192,224,256,-1 v2L2L3 dw 0,8 ,16,24,32 ,40 ,48 ,56 ,64 ,80 ,96 ,112,128,144,160,-1 .code