ReactOS  0.4.14-dev-52-g6116262
msacm.h File Reference
#include <pshpack1.h>
#include <poppack.h>
Include dependency graph for msacm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _ACMDRIVERDETAILSA
 
struct  _ACMDRIVERDETAILSW
 
struct  tACMFILTERCHOOSEA
 
struct  _ACMFILTERCHOOSEW
 
struct  _ACMFILTERDETAILSA
 
struct  _ACMFILTERDETAILSW
 
struct  _ACMFILTERTAGDETAILSA
 
struct  _ACMFILTERTAGDETAILSW
 
struct  _ACMFORMATCHOOSEA
 
struct  _ACMFORMATCHOOSEW
 
struct  _ACMFORMATDETAILSA
 
struct  _ACMFORMATDETAILSW
 
struct  _ACMFORMATTAGDETAILSA
 
struct  _ACMFORMATTAGDETAILSW
 
struct  _ACMSTREAMHEADER
 

Macros

#define ACMAPI   WINAPI
 
#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_NAME   0x00000001L
 
#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
 
#define ACMHELPMSGSTRINGA   "acmchoose_help"
 
#define ACMHELPMSGSTRING   WINELIB_NAME_AW(ACMHELPMSGSTRING)
 
#define ACMHELPMSGCONTEXTMENUA   "acmchoose_contextmenu"
 
#define ACMHELPMSGCONTEXTMENU   WINELIB_NAME_AW(ACMHELPMSGCONTEXTMENU)
 
#define ACMHELPMSGCONTEXTHELPA   "acmchoose_contexthelp"
 
#define ACMHELPMSGCONTEXTHELP   WINELIB_NAME_AW(ACMHELPMSGCONTEXTHELP)
 
#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)
 
#define ACMFILTERCHOOSEHOOKPROC   WINELIB_NAME_AW(ACMFILTERCHOOSEHOOKPROC)
 
#define ACMFORMATCHOOSEHOOKPROC   WINELIB_NAME_AW(ACMFORMATCHOOSEHOOKPROC)
 
#define _ACMSTREAMHEADERRESERVE   10
 
#define ACMFILTERENUMCB   WINELIB_NAME_AW(ACMFILTERENUMCB)
 
#define ACMFILTERTAGENUMCB   WINELIB_NAME_AW(ACMFILTERTAGENUMCB)
 
#define ACMFORMATENUMCB   WINELIB_NAME_AW(ACMFORMATENUMCB)
 
#define ACMFORMATTAGENUMCB   WINELIB_NAME_AW(ACMFORMATTAGENUMCB)
 
#define acmDriverAdd   WINELIB_NAME_AW(acmDriverAdd)
 
#define acmDriverDetails   WINELIB_NAME_AW(acmDriverDetails)
 
#define acmFilterChoose   WINELIB_NAME_AW(acmFilterChoose)
 
#define acmFilterDetails   WINELIB_NAME_AW(acmFilterDetails)
 
#define acmFilterEnum   WINELIB_NAME_AW(acmFilterEnum)
 
#define acmFilterTagDetails   WINELIB_NAME_AW(acmFilterTagDetails)
 
#define acmFilterTagEnum   WINELIB_NAME_AW(acmFilterTagEnum)
 
#define acmFormatChoose   WINELIB_NAME_AW(acmFormatChoose)
 
#define acmFormatDetails   WINELIB_NAME_AW(acmFormatDetails)
 
#define acmFormatEnum   WINELIB_NAME_AW(acmFormatEnum)
 
#define acmFormatTagDetails   WINELIB_NAME_AW(acmFormatTagDetails)
 
#define acmFormatTagEnum   WINELIB_NAME_AW(acmFormatTagEnum)
 

Typedefs

typedef HACMDRIVERID * PHACMDRIVERID
 
typedef HACMDRIVERID * LPHACMDRIVERID
 
typedef HACMDRIVER * PHACMDRIVER
 
typedef HACMDRIVER * LPHACMDRIVER
 
typedef HACMSTREAM * PHACMSTREAM
 
typedef HACMSTREAM * LPHACMSTREAM
 
typedef HACMOBJ * PHACMOBJ
 
typedef HACMOBJ * LPHACMOBJ
 
typedef BOOL(CALLBACKACMDRIVERENUMCB) (HACMDRIVERID hadid, DWORD_PTR dwInstance, DWORD fdwSupport)
 
typedef UINT(CALLBACKACMFILTERCHOOSEHOOKPROCA) (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
typedef UINT(CALLBACKACMFILTERCHOOSEHOOKPROCW) (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
typedef UINT(CALLBACKACMFORMATCHOOSEHOOKPROCA) (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
typedef UINT(CALLBACKACMFORMATCHOOSEHOOKPROCW) (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
typedef struct _ACMDRIVERDETAILSA ACMDRIVERDETAILSA
 
typedef struct _ACMDRIVERDETAILSAPACMDRIVERDETAILSA
 
typedef struct _ACMDRIVERDETAILSALPACMDRIVERDETAILSA
 
typedef struct _ACMDRIVERDETAILSW ACMDRIVERDETAILSW
 
typedef struct _ACMDRIVERDETAILSWPACMDRIVERDETAILSW
 
typedef struct _ACMDRIVERDETAILSWLPACMDRIVERDETAILSW
 
typedef struct tACMFILTERCHOOSEA ACMFILTERCHOOSEA
 
typedef struct tACMFILTERCHOOSEAPACMFILTERCHOOSEA
 
typedef struct tACMFILTERCHOOSEALPACMFILTERCHOOSEA
 
typedef struct _ACMFILTERCHOOSEW ACMFILTERCHOOSEW
 
typedef struct _ACMFILTERCHOOSEWPACMFILTERCHOOSEW
 
typedef struct _ACMFILTERCHOOSEWLPACMFILTERCHOOSEW
 
typedef struct _ACMFILTERDETAILSA ACMFILTERDETAILSA
 
typedef struct _ACMFILTERDETAILSAPACMFILTERDETAILSA
 
typedef struct _ACMFILTERDETAILSALPACMFILTERDETAILSA
 
typedef struct _ACMFILTERDETAILSW ACMFILTERDETAILSW
 
typedef struct _ACMFILTERDETAILSWPACMFILTERDETAILSW
 
typedef struct _ACMFILTERDETAILSWLPACMFILTERDETAILSW
 
typedef struct _ACMFILTERTAGDETAILSA ACMFILTERTAGDETAILSA
 
typedef struct _ACMFILTERTAGDETAILSAPACMFILTERTAGDETAILSA
 
typedef struct _ACMFILTERTAGDETAILSALPACMFILTERTAGDETAILSA
 
typedef struct _ACMFILTERTAGDETAILSW ACMFILTERTAGDETAILSW
 
typedef struct _ACMFILTERTAGDETAILSWPACMFILTERTAGDETAILSW
 
typedef struct _ACMFILTERTAGDETAILSWLPACMFILTERTAGDETAILSW
 
typedef struct _ACMFORMATCHOOSEA ACMFORMATCHOOSEA
 
typedef struct _ACMFORMATCHOOSEAPACMFORMATCHOOSEA
 
typedef struct _ACMFORMATCHOOSEALPACMFORMATCHOOSEA
 
typedef struct _ACMFORMATCHOOSEW ACMFORMATCHOOSEW
 
typedef struct _ACMFORMATCHOOSEWPACMFORMATCHOOSEW
 
typedef struct _ACMFORMATCHOOSEWLPACMFORMATCHOOSEW
 
typedef struct _ACMFORMATDETAILSA ACMFORMATDETAILSA
 
typedef struct _ACMFORMATDETAILSAPACMFORMATDETAILSA
 
typedef struct _ACMFORMATDETAILSALPACMFORMATDETAILSA
 
typedef struct _ACMFORMATDETAILSW ACMFORMATDETAILSW
 
typedef struct _ACMFORMATDETAILSWPACMFORMATDETAILSW
 
typedef struct _ACMFORMATDETAILSWLPACMFORMATDETAILSW
 
typedef struct _ACMFORMATTAGDETAILSA ACMFORMATTAGDETAILSA
 
typedef struct _ACMFORMATTAGDETAILSAPACMFORMATTAGDETAILSA
 
typedef struct _ACMFORMATTAGDETAILSALPACMFORMATTAGDETAILSA
 
typedef struct _ACMFORMATTAGDETAILSW ACMFORMATTAGDETAILSW
 
typedef struct _ACMFORMATTAGDETAILSWPACMFORMATTAGDETAILSW
 
typedef struct _ACMFORMATTAGDETAILSWLPACMFORMATTAGDETAILSW
 
typedef struct _ACMSTREAMHEADER ACMSTREAMHEADER
 
typedef struct _ACMSTREAMHEADERPACMSTREAMHEADER
 
typedef struct _ACMSTREAMHEADERLPACMSTREAMHEADER
 
typedef BOOL(CALLBACKACMFILTERENUMCBA) (HACMDRIVERID hadid, PACMFILTERDETAILSA pafd, DWORD_PTR dwInstance, DWORD fdwSupport)
 
typedef BOOL(CALLBACKACMFILTERENUMCBW) (HACMDRIVERID hadid, PACMFILTERDETAILSW pafd, DWORD_PTR dwInstance, DWORD fdwSupport)
 
typedef BOOL(CALLBACKACMFILTERTAGENUMCBA) (HACMDRIVERID hadid, PACMFILTERTAGDETAILSA paftd, DWORD_PTR dwInstance, DWORD fdwSupport)
 
typedef BOOL(CALLBACKACMFILTERTAGENUMCBW) (HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftd, DWORD_PTR dwInstance, DWORD fdwSupport)
 
typedef BOOL(CALLBACKACMFORMATENUMCBA) (HACMDRIVERID hadid, PACMFORMATDETAILSA pafd, DWORD_PTR dwInstance, DWORD fdwSupport)
 
typedef BOOL(CALLBACKACMFORMATENUMCBW) (HACMDRIVERID hadid, PACMFORMATDETAILSW pafd, DWORD_PTR dwInstance, DWORD fdwSupport)
 
typedef BOOL(CALLBACKACMFORMATTAGENUMCBA) (HACMDRIVERID hadid, PACMFORMATTAGDETAILSA paftd, DWORD_PTR dwInstance, DWORD fdwSupport)
 
typedef BOOL(CALLBACKACMFORMATTAGENUMCBW) (HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftd, DWORD_PTR dwInstance, DWORD fdwSupport)
 

Functions

 DECLARE_HANDLE (HACMDRIVERID)
 
 DECLARE_HANDLE (HACMDRIVER)
 
 DECLARE_HANDLE (HACMSTREAM)
 
 DECLARE_HANDLE (HACMOBJ)
 
MMRESULT WINAPI acmDriverAddA (PHACMDRIVERID phadid, HINSTANCE hinstModule, LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
 
MMRESULT WINAPI acmDriverAddW (PHACMDRIVERID phadid, HINSTANCE hinstModule, LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
 
MMRESULT WINAPI acmDriverClose (HACMDRIVER had, DWORD fdwClose)
 
MMRESULT WINAPI acmDriverDetailsA (HACMDRIVERID hadid, PACMDRIVERDETAILSA padd, DWORD fdwDetails)
 
MMRESULT WINAPI acmDriverDetailsW (HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails)
 
MMRESULT WINAPI acmDriverEnum (ACMDRIVERENUMCB fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmDriverID (HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID)
 
LRESULT WINAPI acmDriverMessage (HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 
MMRESULT WINAPI acmDriverOpen (PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
 
MMRESULT WINAPI acmDriverPriority (HACMDRIVERID hadid, DWORD dwPriority, DWORD fdwPriority)
 
MMRESULT WINAPI acmDriverRemove (HACMDRIVERID hadid, DWORD fdwRemove)
 
MMRESULT WINAPI acmFilterChooseA (PACMFILTERCHOOSEA pafltrc)
 
MMRESULT WINAPI acmFilterChooseW (PACMFILTERCHOOSEW pafltrc)
 
MMRESULT WINAPI acmFilterDetailsA (HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails)
 
MMRESULT WINAPI acmFilterDetailsW (HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails)
 
MMRESULT WINAPI acmFilterEnumA (HACMDRIVER had, PACMFILTERDETAILSA pafd, ACMFILTERENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmFilterEnumW (HACMDRIVER had, PACMFILTERDETAILSW pafd, ACMFILTERENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmFilterTagDetailsA (HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, DWORD fdwDetails)
 
MMRESULT WINAPI acmFilterTagDetailsW (HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails)
 
MMRESULT WINAPI acmFilterTagEnumA (HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, ACMFILTERTAGENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmFilterTagEnumW (HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, ACMFILTERTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmFormatChooseA (PACMFORMATCHOOSEA pafmtc)
 
MMRESULT WINAPI acmFormatChooseW (PACMFORMATCHOOSEW pafmtc)
 
MMRESULT WINAPI acmFormatDetailsA (HACMDRIVER had, PACMFORMATDETAILSA pafd, DWORD fdwDetails)
 
MMRESULT WINAPI acmFormatDetailsW (HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails)
 
MMRESULT WINAPI acmFormatEnumA (HACMDRIVER had, PACMFORMATDETAILSA pafd, ACMFORMATENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmFormatEnumW (HACMDRIVER had, PACMFORMATDETAILSW pafd, ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmFormatSuggest (HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest)
 
MMRESULT WINAPI acmFormatTagDetailsA (HACMDRIVER had, PACMFORMATTAGDETAILSA paftd, DWORD fdwDetails)
 
MMRESULT WINAPI acmFormatTagDetailsW (HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails)
 
MMRESULT WINAPI acmFormatTagEnumA (HACMDRIVER had, PACMFORMATTAGDETAILSA paftd, ACMFORMATTAGENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmFormatTagEnumW (HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, ACMFORMATTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
DWORD WINAPI acmGetVersion (void)
 
MMRESULT WINAPI acmMetrics (HACMOBJ hao, UINT uMetric, LPVOID pMetric)
 
MMRESULT WINAPI acmStreamClose (HACMSTREAM has, DWORD fdwClose)
 
MMRESULT WINAPI acmStreamConvert (HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwConvert)
 
MMRESULT WINAPI acmStreamMessage (HACMSTREAM has, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 
MMRESULT WINAPI acmStreamOpen (PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
 
MMRESULT WINAPI acmStreamPrepareHeader (HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare)
 
MMRESULT WINAPI acmStreamReset (HACMSTREAM has, DWORD fdwReset)
 
MMRESULT WINAPI acmStreamSize (HACMSTREAM has, DWORD cbInput, LPDWORD pdwOutputBytes, DWORD fdwSize)
 
MMRESULT WINAPI acmStreamUnprepareHeader (HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare)
 

Variables

static const WCHAR ACMHELPMSGSTRINGW []
 
static const WCHAR ACMHELPMSGCONTEXTMENUW []
 
static const WCHAR ACMHELPMSGCONTEXTHELPW []
 

Macro Definition Documentation

◆ _ACMSTREAMHEADERRESERVE

#define _ACMSTREAMHEADERRESERVE   10

Definition at line 545 of file msacm.h.

◆ ACM_DRIVERADDF_FUNCTION

#define ACM_DRIVERADDF_FUNCTION   0x00000003L

Definition at line 46 of file msacm.h.

◆ ACM_DRIVERADDF_GLOBAL

#define ACM_DRIVERADDF_GLOBAL   0x00000008L

Definition at line 50 of file msacm.h.

◆ ACM_DRIVERADDF_LOCAL

#define ACM_DRIVERADDF_LOCAL   0x00000000L

Definition at line 49 of file msacm.h.

◆ ACM_DRIVERADDF_NAME

#define ACM_DRIVERADDF_NAME   0x00000001L

Definition at line 45 of file msacm.h.

◆ ACM_DRIVERADDF_NOTIFYHWND

#define ACM_DRIVERADDF_NOTIFYHWND   0x00000004L

Definition at line 47 of file msacm.h.

◆ ACM_DRIVERADDF_TYPEMASK

#define ACM_DRIVERADDF_TYPEMASK   0x00000007L

Definition at line 48 of file msacm.h.

◆ ACM_DRIVERENUMF_DISABLED

#define ACM_DRIVERENUMF_DISABLED   0x80000000L

Definition at line 70 of file msacm.h.

◆ ACM_DRIVERENUMF_NOLOCAL

#define ACM_DRIVERENUMF_NOLOCAL   0x40000000L

Definition at line 69 of file msacm.h.

◆ ACM_DRIVERPRIORITYF_ABLEMASK

#define ACM_DRIVERPRIORITYF_ABLEMASK   0x00000003L

Definition at line 74 of file msacm.h.

◆ ACM_DRIVERPRIORITYF_BEGIN

#define ACM_DRIVERPRIORITYF_BEGIN   0x00010000L

Definition at line 75 of file msacm.h.

◆ ACM_DRIVERPRIORITYF_DEFERMASK

#define ACM_DRIVERPRIORITYF_DEFERMASK   0x00030000L

Definition at line 77 of file msacm.h.

◆ ACM_DRIVERPRIORITYF_DISABLE

#define ACM_DRIVERPRIORITYF_DISABLE   0x00000002L

Definition at line 73 of file msacm.h.

◆ ACM_DRIVERPRIORITYF_ENABLE

#define ACM_DRIVERPRIORITYF_ENABLE   0x00000001L

Definition at line 72 of file msacm.h.

◆ ACM_DRIVERPRIORITYF_END

#define ACM_DRIVERPRIORITYF_END   0x00020000L

Definition at line 76 of file msacm.h.

◆ ACM_FILTERDETAILSF_FILTER

#define ACM_FILTERDETAILSF_FILTER   0x00000001L

Definition at line 96 of file msacm.h.

◆ ACM_FILTERDETAILSF_INDEX

#define ACM_FILTERDETAILSF_INDEX   0x00000000L

Definition at line 95 of file msacm.h.

◆ ACM_FILTERDETAILSF_QUERYMASK

#define ACM_FILTERDETAILSF_QUERYMASK   0x0000000FL

Definition at line 97 of file msacm.h.

◆ ACM_FILTERENUMF_DWFILTERTAG

#define ACM_FILTERENUMF_DWFILTERTAG   0x00010000L

Definition at line 106 of file msacm.h.

◆ ACM_FILTERTAGDETAILSF_FILTERTAG

#define ACM_FILTERTAGDETAILSF_FILTERTAG   0x00000001L

Definition at line 102 of file msacm.h.

◆ ACM_FILTERTAGDETAILSF_INDEX

#define ACM_FILTERTAGDETAILSF_INDEX   0x00000000L

Definition at line 101 of file msacm.h.

◆ ACM_FILTERTAGDETAILSF_LARGESTSIZE

#define ACM_FILTERTAGDETAILSF_LARGESTSIZE   0x00000002L

Definition at line 103 of file msacm.h.

◆ ACM_FILTERTAGDETAILSF_QUERYMASK

#define ACM_FILTERTAGDETAILSF_QUERYMASK   0x0000000FL

Definition at line 104 of file msacm.h.

◆ ACM_FORMATDETAILSF_FORMAT

#define ACM_FORMATDETAILSF_FORMAT   0x00000001L

Definition at line 161 of file msacm.h.

◆ ACM_FORMATDETAILSF_INDEX

#define ACM_FORMATDETAILSF_INDEX   0x00000000L

Definition at line 160 of file msacm.h.

◆ ACM_FORMATDETAILSF_QUERYMASK

#define ACM_FORMATDETAILSF_QUERYMASK   0x0000000FL

Definition at line 162 of file msacm.h.

◆ ACM_FORMATENUMF_CONVERT

#define ACM_FORMATENUMF_CONVERT   0x00100000L

Definition at line 168 of file msacm.h.

◆ ACM_FORMATENUMF_HARDWARE

#define ACM_FORMATENUMF_HARDWARE   0x00400000L

Definition at line 170 of file msacm.h.

◆ ACM_FORMATENUMF_INPUT

#define ACM_FORMATENUMF_INPUT   0x00800000L

Definition at line 171 of file msacm.h.

◆ ACM_FORMATENUMF_NCHANNELS

#define ACM_FORMATENUMF_NCHANNELS   0x00020000L

Definition at line 165 of file msacm.h.

◆ ACM_FORMATENUMF_NSAMPLESPERSEC

#define ACM_FORMATENUMF_NSAMPLESPERSEC   0x00040000L

Definition at line 166 of file msacm.h.

◆ ACM_FORMATENUMF_OUTPUT

#define ACM_FORMATENUMF_OUTPUT   0x01000000L

Definition at line 172 of file msacm.h.

◆ ACM_FORMATENUMF_SUGGEST

#define ACM_FORMATENUMF_SUGGEST   0x00200000L

Definition at line 169 of file msacm.h.

◆ ACM_FORMATENUMF_WBITSPERSAMPLE

#define ACM_FORMATENUMF_WBITSPERSAMPLE   0x00080000L

Definition at line 167 of file msacm.h.

◆ ACM_FORMATENUMF_WFORMATTAG

#define ACM_FORMATENUMF_WFORMATTAG   0x00010000L

Definition at line 164 of file msacm.h.

◆ ACM_FORMATSUGGESTF_NCHANNELS

#define ACM_FORMATSUGGESTF_NCHANNELS   0x00020000L

Definition at line 175 of file msacm.h.

◆ ACM_FORMATSUGGESTF_NSAMPLESPERSEC

#define ACM_FORMATSUGGESTF_NSAMPLESPERSEC   0x00040000L

Definition at line 176 of file msacm.h.

◆ ACM_FORMATSUGGESTF_TYPEMASK

#define ACM_FORMATSUGGESTF_TYPEMASK   0x00FF0000L

Definition at line 178 of file msacm.h.

◆ ACM_FORMATSUGGESTF_WBITSPERSAMPLE

#define ACM_FORMATSUGGESTF_WBITSPERSAMPLE   0x00080000L

Definition at line 177 of file msacm.h.

◆ ACM_FORMATSUGGESTF_WFORMATTAG

#define ACM_FORMATSUGGESTF_WFORMATTAG   0x00010000L

Definition at line 174 of file msacm.h.

◆ ACM_FORMATTAGDETAILSF_FORMATTAG

#define ACM_FORMATTAGDETAILSF_FORMATTAG   0x00000001L

Definition at line 183 of file msacm.h.

◆ ACM_FORMATTAGDETAILSF_INDEX

#define ACM_FORMATTAGDETAILSF_INDEX   0x00000000L

Definition at line 182 of file msacm.h.

◆ ACM_FORMATTAGDETAILSF_LARGESTSIZE

#define ACM_FORMATTAGDETAILSF_LARGESTSIZE   0x00000002L

Definition at line 184 of file msacm.h.

◆ ACM_FORMATTAGDETAILSF_QUERYMASK

#define ACM_FORMATTAGDETAILSF_QUERYMASK   0x0000000FL

Definition at line 185 of file msacm.h.

◆ ACM_METRIC_COUNT_CODECS

#define ACM_METRIC_COUNT_CODECS   2

Definition at line 188 of file msacm.h.

◆ ACM_METRIC_COUNT_CONVERTERS

#define ACM_METRIC_COUNT_CONVERTERS   3

Definition at line 189 of file msacm.h.

◆ ACM_METRIC_COUNT_DISABLED

#define ACM_METRIC_COUNT_DISABLED   5

Definition at line 191 of file msacm.h.

◆ ACM_METRIC_COUNT_DRIVERS

#define ACM_METRIC_COUNT_DRIVERS   1

Definition at line 187 of file msacm.h.

◆ ACM_METRIC_COUNT_FILTERS

#define ACM_METRIC_COUNT_FILTERS   4

Definition at line 190 of file msacm.h.

◆ ACM_METRIC_COUNT_HARDWARE

#define ACM_METRIC_COUNT_HARDWARE   6

Definition at line 192 of file msacm.h.

◆ ACM_METRIC_COUNT_LOCAL_CODECS

#define ACM_METRIC_COUNT_LOCAL_CODECS   21

Definition at line 194 of file msacm.h.

◆ ACM_METRIC_COUNT_LOCAL_CONVERTERS

#define ACM_METRIC_COUNT_LOCAL_CONVERTERS   22

Definition at line 195 of file msacm.h.

◆ ACM_METRIC_COUNT_LOCAL_DISABLED

#define ACM_METRIC_COUNT_LOCAL_DISABLED   24

Definition at line 197 of file msacm.h.

◆ ACM_METRIC_COUNT_LOCAL_DRIVERS

#define ACM_METRIC_COUNT_LOCAL_DRIVERS   20

Definition at line 193 of file msacm.h.

◆ ACM_METRIC_COUNT_LOCAL_FILTERS

#define ACM_METRIC_COUNT_LOCAL_FILTERS   23

Definition at line 196 of file msacm.h.

◆ ACM_METRIC_DRIVER_PRIORITY

#define ACM_METRIC_DRIVER_PRIORITY   101

Definition at line 203 of file msacm.h.

◆ ACM_METRIC_DRIVER_SUPPORT

#define ACM_METRIC_DRIVER_SUPPORT   100

Definition at line 202 of file msacm.h.

◆ ACM_METRIC_HARDWARE_WAVE_INPUT

#define ACM_METRIC_HARDWARE_WAVE_INPUT   30

Definition at line 198 of file msacm.h.

◆ ACM_METRIC_HARDWARE_WAVE_OUTPUT

#define ACM_METRIC_HARDWARE_WAVE_OUTPUT   31

Definition at line 199 of file msacm.h.

◆ ACM_METRIC_MAX_SIZE_FILTER

#define ACM_METRIC_MAX_SIZE_FILTER   51

Definition at line 201 of file msacm.h.

◆ ACM_METRIC_MAX_SIZE_FORMAT

#define ACM_METRIC_MAX_SIZE_FORMAT   50

Definition at line 200 of file msacm.h.

◆ ACM_STREAMCONVERTF_BLOCKALIGN

#define ACM_STREAMCONVERTF_BLOCKALIGN   0x00000004

Definition at line 205 of file msacm.h.

◆ ACM_STREAMCONVERTF_END

#define ACM_STREAMCONVERTF_END   0x00000020

Definition at line 207 of file msacm.h.

◆ ACM_STREAMCONVERTF_START

#define ACM_STREAMCONVERTF_START   0x00000010

Definition at line 206 of file msacm.h.

◆ ACM_STREAMOPENF_ASYNC

#define ACM_STREAMOPENF_ASYNC   0x00000002

Definition at line 214 of file msacm.h.

◆ ACM_STREAMOPENF_NONREALTIME

#define ACM_STREAMOPENF_NONREALTIME   0x00000004

Definition at line 215 of file msacm.h.

◆ ACM_STREAMOPENF_QUERY

#define ACM_STREAMOPENF_QUERY   0x00000001

Definition at line 213 of file msacm.h.

◆ ACM_STREAMSIZEF_DESTINATION

#define ACM_STREAMSIZEF_DESTINATION   0x00000001L

Definition at line 218 of file msacm.h.

◆ ACM_STREAMSIZEF_QUERYMASK

#define ACM_STREAMSIZEF_QUERYMASK   0x0000000FL

Definition at line 219 of file msacm.h.

◆ ACM_STREAMSIZEF_SOURCE

#define ACM_STREAMSIZEF_SOURCE   0x00000000L

Definition at line 217 of file msacm.h.

◆ ACMAPI

#define ACMAPI   WINAPI

Definition at line 30 of file msacm.h.

◆ ACMDM_BASE

#define ACMDM_BASE   ACMDM_RESERVED_LOW

Definition at line 225 of file msacm.h.

◆ ACMDM_DRIVER_ABOUT

#define ACMDM_DRIVER_ABOUT   (ACMDM_BASE + 11)

Definition at line 227 of file msacm.h.

◆ ACMDM_RESERVED_HIGH

#define ACMDM_RESERVED_HIGH   (DRV_USER + 0x2FFF)

Definition at line 223 of file msacm.h.

◆ ACMDM_RESERVED_LOW

#define ACMDM_RESERVED_LOW   (DRV_USER + 0x2000)

Definition at line 222 of file msacm.h.

◆ ACMDM_USER

#define ACMDM_USER   (DRV_USER + 0x0000)

Definition at line 221 of file msacm.h.

◆ acmDriverAdd

#define acmDriverAdd   WINELIB_NAME_AW(acmDriverAdd)

Definition at line 630 of file msacm.h.

◆ acmDriverDetails

#define acmDriverDetails   WINELIB_NAME_AW(acmDriverDetails)

Definition at line 641 of file msacm.h.

◆ ACMDRIVERDETAILS_COPYRIGHT_CHARS

#define ACMDRIVERDETAILS_COPYRIGHT_CHARS   80

Definition at line 54 of file msacm.h.

◆ ACMDRIVERDETAILS_FCCCOMP_UNDEFINED

#define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED   mmioFOURCC('\0', '\0', '\0', '\0')

Definition at line 59 of file msacm.h.

◆ ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC

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

Definition at line 58 of file msacm.h.

◆ ACMDRIVERDETAILS_FEATURES_CHARS

#define ACMDRIVERDETAILS_FEATURES_CHARS   512

Definition at line 56 of file msacm.h.

◆ ACMDRIVERDETAILS_LICENSING_CHARS

#define ACMDRIVERDETAILS_LICENSING_CHARS   128

Definition at line 55 of file msacm.h.

◆ ACMDRIVERDETAILS_LONGNAME_CHARS

#define ACMDRIVERDETAILS_LONGNAME_CHARS   128

Definition at line 53 of file msacm.h.

◆ ACMDRIVERDETAILS_SHORTNAME_CHARS

#define ACMDRIVERDETAILS_SHORTNAME_CHARS   32

Definition at line 52 of file msacm.h.

◆ ACMDRIVERDETAILS_SUPPORTF_ASYNC

#define ACMDRIVERDETAILS_SUPPORTF_ASYNC   0x00000010L

Definition at line 65 of file msacm.h.

◆ ACMDRIVERDETAILS_SUPPORTF_CODEC

#define ACMDRIVERDETAILS_SUPPORTF_CODEC   0x00000001L

Definition at line 61 of file msacm.h.

◆ ACMDRIVERDETAILS_SUPPORTF_CONVERTER

#define ACMDRIVERDETAILS_SUPPORTF_CONVERTER   0x00000002L

Definition at line 62 of file msacm.h.

◆ ACMDRIVERDETAILS_SUPPORTF_DISABLED

#define ACMDRIVERDETAILS_SUPPORTF_DISABLED   0x80000000L

Definition at line 67 of file msacm.h.

◆ ACMDRIVERDETAILS_SUPPORTF_FILTER

#define ACMDRIVERDETAILS_SUPPORTF_FILTER   0x00000004L

Definition at line 63 of file msacm.h.

◆ ACMDRIVERDETAILS_SUPPORTF_HARDWARE

#define ACMDRIVERDETAILS_SUPPORTF_HARDWARE   0x00000008L

Definition at line 64 of file msacm.h.

◆ ACMDRIVERDETAILS_SUPPORTF_LOCAL

#define ACMDRIVERDETAILS_SUPPORTF_LOCAL   0x40000000L

Definition at line 66 of file msacm.h.

◆ ACMERR_BASE

#define ACMERR_BASE   512

Definition at line 35 of file msacm.h.

◆ ACMERR_BUSY

#define ACMERR_BUSY   (ACMERR_BASE + 1)

Definition at line 37 of file msacm.h.

◆ ACMERR_CANCELED

#define ACMERR_CANCELED   (ACMERR_BASE + 3)

Definition at line 39 of file msacm.h.

◆ ACMERR_NOTPOSSIBLE

#define ACMERR_NOTPOSSIBLE   (ACMERR_BASE + 0)

Definition at line 36 of file msacm.h.

◆ ACMERR_UNPREPARED

#define ACMERR_UNPREPARED   (ACMERR_BASE + 2)

Definition at line 38 of file msacm.h.

◆ acmFilterChoose

#define acmFilterChoose   WINELIB_NAME_AW(acmFilterChoose)

Definition at line 667 of file msacm.h.

◆ ACMFILTERCHOOSE_STYLEF_CONTEXTHELP

#define ACMFILTERCHOOSE_STYLEF_CONTEXTHELP   0x00000080L

Definition at line 91 of file msacm.h.

◆ ACMFILTERCHOOSE_STYLEF_ENABLEHOOK

#define ACMFILTERCHOOSE_STYLEF_ENABLEHOOK   0x00000008L

Definition at line 87 of file msacm.h.

◆ ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE

#define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE   0x00000010L

Definition at line 88 of file msacm.h.

◆ ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE

#define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE   0x00000020L

Definition at line 89 of file msacm.h.

◆ ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT

#define ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT   0x00000040L

Definition at line 90 of file msacm.h.

◆ ACMFILTERCHOOSE_STYLEF_SHOWHELP

#define ACMFILTERCHOOSE_STYLEF_SHOWHELP   0x00000004L

Definition at line 86 of file msacm.h.

◆ ACMFILTERCHOOSEHOOKPROC

#define ACMFILTERCHOOSEHOOKPROC   WINELIB_NAME_AW(ACMFILTERCHOOSEHOOKPROC)

Definition at line 255 of file msacm.h.

◆ acmFilterDetails

#define acmFilterDetails   WINELIB_NAME_AW(acmFilterDetails)

Definition at line 675 of file msacm.h.

◆ ACMFILTERDETAILS_FILTER_CHARS

#define ACMFILTERDETAILS_FILTER_CHARS   128

Definition at line 93 of file msacm.h.

◆ acmFilterEnum

#define acmFilterEnum   WINELIB_NAME_AW(acmFilterEnum)

Definition at line 685 of file msacm.h.

◆ ACMFILTERENUMCB

#define ACMFILTERENUMCB   WINELIB_NAME_AW(ACMFILTERENUMCB)

Definition at line 580 of file msacm.h.

◆ acmFilterTagDetails

#define acmFilterTagDetails   WINELIB_NAME_AW(acmFilterTagDetails)

Definition at line 693 of file msacm.h.

◆ ACMFILTERTAGDETAILS_FILTERTAG_CHARS

#define ACMFILTERTAGDETAILS_FILTERTAG_CHARS   48

Definition at line 99 of file msacm.h.

◆ acmFilterTagEnum

#define acmFilterTagEnum   WINELIB_NAME_AW(acmFilterTagEnum)

Definition at line 703 of file msacm.h.

◆ ACMFILTERTAGENUMCB

#define ACMFILTERTAGENUMCB   WINELIB_NAME_AW(ACMFILTERTAGENUMCB)

Definition at line 592 of file msacm.h.

◆ acmFormatChoose

#define acmFormatChoose   WINELIB_NAME_AW(acmFormatChoose)

Definition at line 711 of file msacm.h.

◆ ACMFORMATCHOOSE_STYLEF_CONTEXTHELP

#define ACMFORMATCHOOSE_STYLEF_CONTEXTHELP   0x00000080L

Definition at line 156 of file msacm.h.

◆ ACMFORMATCHOOSE_STYLEF_ENABLEHOOK

#define ACMFORMATCHOOSE_STYLEF_ENABLEHOOK   0x00000008L

Definition at line 152 of file msacm.h.

◆ ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE

#define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE   0x00000010L

Definition at line 153 of file msacm.h.

◆ ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE

#define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE   0x00000020L

Definition at line 154 of file msacm.h.

◆ ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT

#define ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT   0x00000040L

Definition at line 155 of file msacm.h.

◆ ACMFORMATCHOOSE_STYLEF_SHOWHELP

#define ACMFORMATCHOOSE_STYLEF_SHOWHELP   0x00000004L

Definition at line 151 of file msacm.h.

◆ ACMFORMATCHOOSEHOOKPROC

#define ACMFORMATCHOOSEHOOKPROC   WINELIB_NAME_AW(ACMFORMATCHOOSEHOOKPROC)

Definition at line 264 of file msacm.h.

◆ acmFormatDetails

#define acmFormatDetails   WINELIB_NAME_AW(acmFormatDetails)

Definition at line 719 of file msacm.h.

◆ ACMFORMATDETAILS_FORMAT_CHARS

#define ACMFORMATDETAILS_FORMAT_CHARS   128

Definition at line 158 of file msacm.h.

◆ acmFormatEnum

#define acmFormatEnum   WINELIB_NAME_AW(acmFormatEnum)

Definition at line 729 of file msacm.h.

◆ ACMFORMATENUMCB

#define ACMFORMATENUMCB   WINELIB_NAME_AW(ACMFORMATENUMCB)

Definition at line 604 of file msacm.h.

◆ acmFormatTagDetails

#define acmFormatTagDetails   WINELIB_NAME_AW(acmFormatTagDetails)

Definition at line 741 of file msacm.h.

◆ ACMFORMATTAGDETAILS_FORMATTAG_CHARS

#define ACMFORMATTAGDETAILS_FORMATTAG_CHARS   48

Definition at line 180 of file msacm.h.

◆ acmFormatTagEnum

#define acmFormatTagEnum   WINELIB_NAME_AW(acmFormatTagEnum)

Definition at line 751 of file msacm.h.

◆ ACMFORMATTAGENUMCB

#define ACMFORMATTAGENUMCB   WINELIB_NAME_AW(ACMFORMATTAGENUMCB)

Definition at line 616 of file msacm.h.

◆ ACMHELPMSGCONTEXTHELP

#define ACMHELPMSGCONTEXTHELP   WINELIB_NAME_AW(ACMHELPMSGCONTEXTHELP)

Definition at line 142 of file msacm.h.

◆ ACMHELPMSGCONTEXTHELPA

#define ACMHELPMSGCONTEXTHELPA   "acmchoose_contexthelp"

Definition at line 132 of file msacm.h.

◆ ACMHELPMSGCONTEXTMENU

#define ACMHELPMSGCONTEXTMENU   WINELIB_NAME_AW(ACMHELPMSGCONTEXTMENU)

Definition at line 130 of file msacm.h.

◆ ACMHELPMSGCONTEXTMENUA

#define ACMHELPMSGCONTEXTMENUA   "acmchoose_contextmenu"

Definition at line 120 of file msacm.h.

◆ ACMHELPMSGSTRING

#define ACMHELPMSGSTRING   WINELIB_NAME_AW(ACMHELPMSGSTRING)

Definition at line 118 of file msacm.h.

◆ ACMHELPMSGSTRINGA

#define ACMHELPMSGSTRINGA   "acmchoose_help"

Definition at line 108 of file msacm.h.

◆ ACMSTREAMHEADER_STATUSF_DONE

#define ACMSTREAMHEADER_STATUSF_DONE   0x00010000L

Definition at line 209 of file msacm.h.

◆ ACMSTREAMHEADER_STATUSF_INQUEUE

#define ACMSTREAMHEADER_STATUSF_INQUEUE   0x00100000L

Definition at line 211 of file msacm.h.

◆ ACMSTREAMHEADER_STATUSF_PREPARED

#define ACMSTREAMHEADER_STATUSF_PREPARED   0x00020000L

Definition at line 210 of file msacm.h.

◆ FILTERCHOOSE_CUSTOM_VERIFY

#define FILTERCHOOSE_CUSTOM_VERIFY   (FILTERCHOOSE_MESSAGE+2)

Definition at line 84 of file msacm.h.

◆ FILTERCHOOSE_FILTER_VERIFY

#define FILTERCHOOSE_FILTER_VERIFY   (FILTERCHOOSE_MESSAGE+1)

Definition at line 83 of file msacm.h.

◆ FILTERCHOOSE_FILTERTAG_VERIFY

#define FILTERCHOOSE_FILTERTAG_VERIFY   (FILTERCHOOSE_MESSAGE+0)

Definition at line 82 of file msacm.h.

◆ FILTERCHOOSE_MESSAGE

#define FILTERCHOOSE_MESSAGE   0

Definition at line 81 of file msacm.h.

◆ FORMATCHOOSE_CUSTOM_VERIFY

#define FORMATCHOOSE_CUSTOM_VERIFY   (FORMATCHOOSE_MESSAGE+2)

Definition at line 149 of file msacm.h.

◆ FORMATCHOOSE_FORMAT_VERIFY

#define FORMATCHOOSE_FORMAT_VERIFY   (FORMATCHOOSE_MESSAGE+1)

Definition at line 148 of file msacm.h.

◆ FORMATCHOOSE_FORMATTAG_VERIFY

#define FORMATCHOOSE_FORMATTAG_VERIFY   (FORMATCHOOSE_MESSAGE+0)

Definition at line 147 of file msacm.h.

◆ FORMATCHOOSE_MESSAGE

#define FORMATCHOOSE_MESSAGE   0

Definition at line 146 of file msacm.h.

◆ MM_ACM_CLOSE

#define MM_ACM_CLOSE   MM_STREAM_CLOSE

Definition at line 42 of file msacm.h.

◆ MM_ACM_DONE

#define MM_ACM_DONE   MM_STREAM_DONE

Definition at line 43 of file msacm.h.

◆ MM_ACM_FILTERCHOOSE

#define MM_ACM_FILTERCHOOSE   0x8000

Definition at line 79 of file msacm.h.

◆ MM_ACM_FORMATCHOOSE

#define MM_ACM_FORMATCHOOSE   0x8000

Definition at line 144 of file msacm.h.

◆ MM_ACM_OPEN

#define MM_ACM_OPEN   MM_STREAM_OPEN

Definition at line 41 of file msacm.h.

Typedef Documentation

◆ ACMDRIVERDETAILSA

◆ ACMDRIVERDETAILSW

◆ ACMDRIVERENUMCB

typedef BOOL(CALLBACK * ACMDRIVERENUMCB) (HACMDRIVERID hadid, DWORD_PTR dwInstance, DWORD fdwSupport)

Definition at line 244 of file msacm.h.

◆ ACMFILTERCHOOSEA

◆ ACMFILTERCHOOSEHOOKPROCA

typedef UINT(CALLBACK * ACMFILTERCHOOSEHOOKPROCA) (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

Definition at line 248 of file msacm.h.

◆ ACMFILTERCHOOSEHOOKPROCW

typedef UINT(CALLBACK * ACMFILTERCHOOSEHOOKPROCW) (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

Definition at line 252 of file msacm.h.

◆ ACMFILTERCHOOSEW

◆ ACMFILTERDETAILSA

◆ ACMFILTERDETAILSW

◆ ACMFILTERENUMCBA

typedef BOOL(CALLBACK * ACMFILTERENUMCBA) (HACMDRIVERID hadid, PACMFILTERDETAILSA pafd, DWORD_PTR dwInstance, DWORD fdwSupport)

Definition at line 570 of file msacm.h.

◆ ACMFILTERENUMCBW

typedef BOOL(CALLBACK * ACMFILTERENUMCBW) (HACMDRIVERID hadid, PACMFILTERDETAILSW pafd, DWORD_PTR dwInstance, DWORD fdwSupport)

Definition at line 575 of file msacm.h.

◆ ACMFILTERTAGDETAILSA

◆ ACMFILTERTAGDETAILSW

◆ ACMFILTERTAGENUMCBA

typedef BOOL(CALLBACK * ACMFILTERTAGENUMCBA) (HACMDRIVERID hadid, PACMFILTERTAGDETAILSA paftd, DWORD_PTR dwInstance, DWORD fdwSupport)

Definition at line 582 of file msacm.h.

◆ ACMFILTERTAGENUMCBW

typedef BOOL(CALLBACK * ACMFILTERTAGENUMCBW) (HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftd, DWORD_PTR dwInstance, DWORD fdwSupport)

Definition at line 587 of file msacm.h.

◆ ACMFORMATCHOOSEA

◆ ACMFORMATCHOOSEHOOKPROCA

typedef UINT(CALLBACK * ACMFORMATCHOOSEHOOKPROCA) (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

Definition at line 257 of file msacm.h.

◆ ACMFORMATCHOOSEHOOKPROCW

typedef UINT(CALLBACK * ACMFORMATCHOOSEHOOKPROCW) (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

Definition at line 261 of file msacm.h.

◆ ACMFORMATCHOOSEW

◆ ACMFORMATDETAILSA

◆ ACMFORMATDETAILSW

◆ ACMFORMATENUMCBA

typedef BOOL(CALLBACK * ACMFORMATENUMCBA) (HACMDRIVERID hadid, PACMFORMATDETAILSA pafd, DWORD_PTR dwInstance, DWORD fdwSupport)

Definition at line 594 of file msacm.h.

◆ ACMFORMATENUMCBW

typedef BOOL(CALLBACK * ACMFORMATENUMCBW) (HACMDRIVERID hadid, PACMFORMATDETAILSW pafd, DWORD_PTR dwInstance, DWORD fdwSupport)

Definition at line 599 of file msacm.h.

◆ ACMFORMATTAGDETAILSA

◆ ACMFORMATTAGDETAILSW

◆ ACMFORMATTAGENUMCBA

typedef BOOL(CALLBACK * ACMFORMATTAGENUMCBA) (HACMDRIVERID hadid, PACMFORMATTAGDETAILSA paftd, DWORD_PTR dwInstance, DWORD fdwSupport)

Definition at line 606 of file msacm.h.

◆ ACMFORMATTAGENUMCBW

typedef BOOL(CALLBACK * ACMFORMATTAGENUMCBW) (HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftd, DWORD_PTR dwInstance, DWORD fdwSupport)

Definition at line 611 of file msacm.h.

◆ ACMSTREAMHEADER

◆ LPACMDRIVERDETAILSA

◆ LPACMDRIVERDETAILSW

◆ LPACMFILTERCHOOSEA

◆ LPACMFILTERCHOOSEW

◆ LPACMFILTERDETAILSA

◆ LPACMFILTERDETAILSW

◆ LPACMFILTERTAGDETAILSA

◆ LPACMFILTERTAGDETAILSW

◆ LPACMFORMATCHOOSEA

◆ LPACMFORMATCHOOSEW

◆ LPACMFORMATDETAILSA

◆ LPACMFORMATDETAILSW

◆ LPACMFORMATTAGDETAILSA

◆ LPACMFORMATTAGDETAILSW

◆ LPACMSTREAMHEADER

◆ LPHACMDRIVER

typedef HACMDRIVER * LPHACMDRIVER

Definition at line 236 of file msacm.h.

◆ LPHACMDRIVERID

typedef HACMDRIVERID * LPHACMDRIVERID

Definition at line 235 of file msacm.h.

◆ LPHACMOBJ

typedef HACMOBJ * LPHACMOBJ

Definition at line 238 of file msacm.h.

◆ LPHACMSTREAM

typedef HACMSTREAM * LPHACMSTREAM

Definition at line 237 of file msacm.h.

◆ PACMDRIVERDETAILSA

◆ PACMDRIVERDETAILSW

◆ PACMFILTERCHOOSEA

◆ PACMFILTERCHOOSEW

◆ PACMFILTERDETAILSA

◆ PACMFILTERDETAILSW

◆ PACMFILTERTAGDETAILSA

◆ PACMFILTERTAGDETAILSW

◆ PACMFORMATCHOOSEA

◆ PACMFORMATCHOOSEW

◆ PACMFORMATDETAILSA

◆ PACMFORMATDETAILSW

◆ PACMFORMATTAGDETAILSA

◆ PACMFORMATTAGDETAILSW

◆ PACMSTREAMHEADER

◆ PHACMDRIVER

typedef HACMDRIVER* PHACMDRIVER

Definition at line 236 of file msacm.h.

◆ PHACMDRIVERID

typedef HACMDRIVERID* PHACMDRIVERID

Definition at line 235 of file msacm.h.

◆ PHACMOBJ

typedef HACMOBJ* PHACMOBJ

Definition at line 238 of file msacm.h.

◆ PHACMSTREAM

typedef HACMSTREAM* PHACMSTREAM

Definition at line 237 of file msacm.h.

Function Documentation

◆ acmDriverAddA()

MMRESULT WINAPI acmDriverAddA ( PHACMDRIVERID  phadid,
HINSTANCE  hinstModule,
LPARAM  lParam,
DWORD  dwPriority,
DWORD  fdwAdd 
)

Definition at line 48 of file driver.c.

50 {
51  MMRESULT resultW;
52  WCHAR * driverW = NULL;
53  LPARAM lParamW = lParam;
54 
55  TRACE("(%p, %p, %08lx, %08x, %08x)\n",
56  phadid, hinstModule, lParam, dwPriority, fdwAdd);
57 
58  if (!phadid) {
59  WARN("invalid parameter\n");
60  return MMSYSERR_INVALPARAM;
61  }
62 
63  /* Check if any unknown flags */
64  if (fdwAdd &
67  WARN("invalid flag\n");
68  return MMSYSERR_INVALFLAG;
69  }
70 
71  /* Check if any incompatible flags */
72  if ((fdwAdd & ACM_DRIVERADDF_FUNCTION) &&
73  (fdwAdd & ACM_DRIVERADDF_NOTIFYHWND)) {
74  WARN("invalid flag\n");
75  return MMSYSERR_INVALFLAG;
76  }
77 
78  /* A->W translation of name */
79  if ((fdwAdd & ACM_DRIVERADDF_TYPEMASK) == ACM_DRIVERADDF_NAME) {
80  INT len;
81 
82  if (lParam == 0) return MMSYSERR_INVALPARAM;
84  driverW = HeapAlloc(MSACM_hHeap, 0, len * sizeof(WCHAR));
85  if (!driverW) return MMSYSERR_NOMEM;
86  MultiByteToWideChar(CP_ACP, 0, (LPSTR)lParam, -1, driverW, len);
87  lParamW = (LPARAM)driverW;
88  }
89 
90  resultW = acmDriverAddW(phadid, hinstModule, lParamW, dwPriority, fdwAdd);
91  HeapFree(MSACM_hHeap, 0, driverW);
92  return resultW;
93 }
#define CP_ACP
Definition: compat.h:99
#define WARN(fmt,...)
Definition: debug.h:111
#define ACM_DRIVERADDF_GLOBAL
Definition: msacm.h:50
UINT MMRESULT
Definition: mmsystem.h:962
char * LPSTR
Definition: xmlstorage.h:182
int32_t INT
Definition: typedefs.h:56
#define MMSYSERR_NOMEM
Definition: mmsystem.h:103
HANDLE MSACM_hHeap
Definition: internal.c:45
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define ACM_DRIVERADDF_NOTIFYHWND
Definition: msacm.h:47
#define TRACE(s)
Definition: solgame.cpp:4
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
GLenum GLsizei len
Definition: glext.h:6722
#define ACM_DRIVERADDF_TYPEMASK
Definition: msacm.h:48
#define ACM_DRIVERADDF_FUNCTION
Definition: msacm.h:46
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define MultiByteToWideChar
Definition: compat.h:100
#define ACM_DRIVERADDF_NAME
Definition: msacm.h:45
MMRESULT WINAPI acmDriverAddW(PHACMDRIVERID phadid, HINSTANCE hinstModule, LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
Definition: driver.c:99
LPARAM lParam
Definition: combotst.c:139
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by test_acmDriverAdd().

◆ acmDriverAddW()

MMRESULT WINAPI acmDriverAddW ( PHACMDRIVERID  phadid,
HINSTANCE  hinstModule,
LPARAM  lParam,
DWORD  dwPriority,
DWORD  fdwAdd 
)

Definition at line 99 of file driver.c.

101 {
102  PWINE_ACMLOCALDRIVER pLocalDrv = NULL;
103 
104  TRACE("(%p, %p, %08lx, %08x, %08x)\n",
105  phadid, hinstModule, lParam, dwPriority, fdwAdd);
106 
107  if (!phadid) {
108  WARN("invalid parameter\n");
109  return MMSYSERR_INVALPARAM;
110  }
111 
112  /* Check if any unknown flags */
113  if (fdwAdd &
116  WARN("invalid flag\n");
117  return MMSYSERR_INVALFLAG;
118  }
119 
120  /* Check if any incompatible flags */
121  if ((fdwAdd & ACM_DRIVERADDF_FUNCTION) &&
122  (fdwAdd & ACM_DRIVERADDF_NOTIFYHWND)) {
123  WARN("invalid flag\n");
124  return MMSYSERR_INVALFLAG;
125  }
126 
127  switch (fdwAdd & ACM_DRIVERADDF_TYPEMASK) {
128  case ACM_DRIVERADDF_NAME:
129  /*
130  hInstModule (unused)
131  lParam name of value in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
132  dwPriority (unused, set to 0)
133  */
134  *phadid = (HACMDRIVERID) MSACM_RegisterDriverFromRegistry((LPCWSTR)lParam);
135  if (!*phadid) {
136  ERR("Unable to register driver via ACM_DRIVERADDF_NAME\n");
137  return MMSYSERR_INVALPARAM;
138  }
139  break;
141  /*
142  hInstModule Handle of module which contains driver entry proc
143  lParam Driver function address
144  dwPriority (unused, set to 0)
145  */
146  fdwAdd &= ~ACM_DRIVERADDF_TYPEMASK;
147  /* FIXME: fdwAdd ignored */
148  /* Application-supplied acmDriverProc's are placed at the top of the priority unless
149  fdwAdd indicates ACM_DRIVERADDF_GLOBAL
150  */
151  pLocalDrv = MSACM_RegisterLocalDriver(hinstModule, (DRIVERPROC)lParam);
152  *phadid = pLocalDrv ? (HACMDRIVERID) MSACM_RegisterDriver(NULL, NULL, pLocalDrv) : NULL;
153  if (!*phadid) {
154  ERR("Unable to register driver via ACM_DRIVERADDF_FUNCTION\n");
155  return MMSYSERR_INVALPARAM;
156  }
157  break;
159  /*
160  hInstModule (unused)
161  lParam Handle of notification window
162  dwPriority Window message to send for notification broadcasts
163  */
164  *phadid = (HACMDRIVERID) MSACM_RegisterNotificationWindow((HWND)lParam, dwPriority);
165  if (!*phadid) {
166  ERR("Unable to register driver via ACM_DRIVERADDF_NOTIFYHWND\n");
167  return MMSYSERR_INVALPARAM;
168  }
169  break;
170  default:
171  ERR("invalid flag value 0x%08x for fdwAdd\n", fdwAdd);
172  return MMSYSERR_INVALFLAG;
173  }
174 
176  return MMSYSERR_NOERROR;
177 }
LRESULT(CALLBACK * DRIVERPROC)(DWORD_PTR, HDRVR, UINT, LPARAM, LPARAM)
Definition: mmsystem.h:1001
PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc)
Definition: internal.c:876
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define WARN(fmt,...)
Definition: debug.h:111
#define ACM_DRIVERADDF_GLOBAL
Definition: msacm.h:50
smooth NULL
Definition: ftsmooth.c:416
#define ACM_DRIVERADDF_NOTIFYHWND
Definition: msacm.h:47
void MSACM_BroadcastNotification(void)
Definition: internal.c:441
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName, PWINE_ACMLOCALDRIVER pLocalDriver)
Definition: internal.c:283
#define ACM_DRIVERADDF_TYPEMASK
Definition: msacm.h:48
#define ERR(fmt,...)
Definition: debug.h:109
#define ACM_DRIVERADDF_FUNCTION
Definition: msacm.h:46
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
PWINE_ACMNOTIFYWND MSACM_RegisterNotificationWindow(HWND hNotifyWnd, DWORD dwNotifyMsg)
Definition: internal.c:414
#define ACM_DRIVERADDF_NAME
Definition: msacm.h:45
LPARAM lParam
Definition: combotst.c:139
PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry)
Definition: internal.c:59

Referenced by acmDriverAddA().

◆ acmDriverClose()

MMRESULT WINAPI acmDriverClose ( HACMDRIVER  had,
DWORD  fdwClose 
)

Definition at line 182 of file driver.c.

183 {
185  PWINE_ACMDRIVERID padid;
186  PWINE_ACMDRIVER* tpad;
187 
188  TRACE("(%p, %08x)\n", had, fdwClose);
189 
190  if (fdwClose) {
191  WARN("invalid flag\n");
192  return MMSYSERR_INVALFLAG;
193  }
194 
195  pad = MSACM_GetDriver(had);
196  if (!pad) {
197  WARN("invalid handle\n");
198  return MMSYSERR_INVALHANDLE;
199  }
200 
201  padid = pad->obj.pACMDriverID;
202 
203  /* remove driver from list */
204  for (tpad = &(padid->pACMDriverList); *tpad; tpad = &((*tpad)->pNextACMDriver)) {
205  if (*tpad == pad) {
206  *tpad = (*tpad)->pNextACMDriver;
207  break;
208  }
209  }
210 
211  /* close driver if it has been opened */
212  if (pad->hDrvr && !pad->pLocalDrvrInst)
213  CloseDriver(pad->hDrvr, 0, 0);
214  else if (pad->pLocalDrvrInst)
215  MSACM_CloseLocalDriver(pad->pLocalDrvrInst);
216 
217  pad->obj.dwType = 0;
218  HeapFree(MSACM_hHeap, 0, pad);
219 
220  return MMSYSERR_NOERROR;
221 }
#define WARN(fmt,...)
Definition: debug.h:111
LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
Definition: driver.c:462
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
HANDLE MSACM_hHeap
Definition: internal.c:45
static void pad(Char *s)
Definition: bzip2.c:908
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
PWINE_ACMDRIVER pACMDriverList
Definition: wineacm.h:91
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver)
Definition: internal.c:837
LRESULT MSACM_CloseLocalDriver(PWINE_ACMLOCALDRIVERINST paldrv)
Definition: internal.c:1069
PWINE_ACMDRIVER pNextACMDriver
Definition: wineacm.h:74
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by acmDriverDetailsW(), acmDriverMessage(), acmFilterDetailsW(), acmFilterEnumW(), acmFilterTagDetailsW(), acmFilterTagEnumW(), acmFormatDetailsW(), acmFormatEnumW(), acmFormatSuggest(), acmFormatTagDetailsW(), acmFormatTagEnumW(), acmStreamClose(), acmStreamOpen(), DriverEnumProc(), FormatEnumProc(), MSACM_FillCache(), MSACM_FillFormatTagsCB(), and MSACM_UnregisterDriver().

◆ acmDriverDetailsA()

MMRESULT WINAPI acmDriverDetailsA ( HACMDRIVERID  hadid,
PACMDRIVERDETAILSA  padd,
DWORD  fdwDetails 
)

Definition at line 226 of file driver.c.

227 {
228  MMRESULT mmr;
229  ACMDRIVERDETAILSW addw;
230 
231  TRACE("(%p, %p, %08x)\n", hadid, padd, fdwDetails);
232 
233  if (!padd) {
234  WARN("invalid parameter\n");
235  return MMSYSERR_INVALPARAM;
236  }
237 
238  if (padd->cbStruct < 4) {
239  WARN("invalid parameter\n");
240  return MMSYSERR_INVALPARAM;
241  }
242 
243  addw.cbStruct = sizeof(addw);
244  mmr = acmDriverDetailsW(hadid, &addw, fdwDetails);
245  if (mmr == 0) {
246  ACMDRIVERDETAILSA padda;
247 
248  padda.fccType = addw.fccType;
249  padda.fccComp = addw.fccComp;
250  padda.wMid = addw.wMid;
251  padda.wPid = addw.wPid;
252  padda.vdwACM = addw.vdwACM;
253  padda.vdwDriver = addw.vdwDriver;
254  padda.fdwSupport = addw.fdwSupport;
255  padda.cFormatTags = addw.cFormatTags;
256  padda.cFilterTags = addw.cFilterTags;
257  padda.hicon = addw.hicon;
258  WideCharToMultiByte( CP_ACP, 0, addw.szShortName, -1, padda.szShortName,
259  sizeof(padda.szShortName), NULL, NULL );
260  WideCharToMultiByte( CP_ACP, 0, addw.szLongName, -1, padda.szLongName,
261  sizeof(padda.szLongName), NULL, NULL );
262  WideCharToMultiByte( CP_ACP, 0, addw.szCopyright, -1, padda.szCopyright,
263  sizeof(padda.szCopyright), NULL, NULL );
264  WideCharToMultiByte( CP_ACP, 0, addw.szLicensing, -1, padda.szLicensing,
265  sizeof(padda.szLicensing), NULL, NULL );
266  WideCharToMultiByte( CP_ACP, 0, addw.szFeatures, -1, padda.szFeatures,
267  sizeof(padda.szFeatures), NULL, NULL );
268  padda.cbStruct = min(padd->cbStruct, sizeof(*padd));
269  memcpy(padd, &padda, padda.cbStruct);
270  }
271  return mmr;
272 }
DWORD cFilterTags
Definition: msacm.h:285
WCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]
Definition: msacm.h:316
#define WideCharToMultiByte
Definition: compat.h:101
CHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]
Definition: msacm.h:293
DWORD cFormatTags
Definition: msacm.h:310
DWORD fdwSupport
Definition: msacm.h:283
#define CP_ACP
Definition: compat.h:99
CHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]
Definition: msacm.h:290
DWORD cFilterTags
Definition: msacm.h:311
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
CHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]
Definition: msacm.h:292
WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]
Definition: msacm.h:319
DWORD vdwDriver
Definition: msacm.h:281
DWORD cbStruct
Definition: msacm.h:272
smooth NULL
Definition: ftsmooth.c:416
DWORD cbStruct
Definition: msacm.h:298
#define TRACE(s)
Definition: solgame.cpp:4
DWORD fdwSupport
Definition: msacm.h:309
FOURCC fccComp
Definition: msacm.h:275
WCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]
Definition: msacm.h:315
DWORD cFormatTags
Definition: msacm.h:284
MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails)
Definition: driver.c:277
DWORD vdwDriver
Definition: msacm.h:307
FOURCC fccType
Definition: msacm.h:274
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
FOURCC fccType
Definition: msacm.h:300
CHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]
Definition: msacm.h:291
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define min(a, b)
Definition: monoChain.cc:55
FOURCC fccComp
Definition: msacm.h:301
WCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]
Definition: msacm.h:318
WCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]
Definition: msacm.h:317
CHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]
Definition: msacm.h:289

Referenced by DriverEnumProc(), and test_acmDriverAdd().

◆ acmDriverDetailsW()

MMRESULT WINAPI acmDriverDetailsW ( HACMDRIVERID  hadid,
PACMDRIVERDETAILSW  padd,
DWORD  fdwDetails 
)

Definition at line 277 of file driver.c.

278 {
279  HACMDRIVER acmDrvr;
280  MMRESULT mmr;
281 
282  TRACE("(%p, %p, %08x)\n", hadid, padd, fdwDetails);
283 
284  if (!padd) {
285  WARN("invalid parameter\n");
286  return MMSYSERR_INVALPARAM;
287  }
288 
289  if (padd->cbStruct < 4) {
290  WARN("invalid parameter\n");
291  return MMSYSERR_INVALPARAM;
292  }
293 
294  if (fdwDetails) {
295  WARN("invalid flag\n");
296  return MMSYSERR_INVALFLAG;
297  }
298 
299  mmr = acmDriverOpen(&acmDrvr, hadid, 0);
300  if (mmr == MMSYSERR_NOERROR) {
301  ACMDRIVERDETAILSW paddw;
302  paddw.cbStruct = sizeof(paddw);
303  mmr = MSACM_Message(acmDrvr, ACMDM_DRIVER_DETAILS, (LPARAM)&paddw, 0);
304 
305  acmDriverClose(acmDrvr, 0);
306  paddw.cbStruct = min(padd->cbStruct, sizeof(*padd));
307  memcpy(padd, &paddw, paddw.cbStruct);
308  }
309  else if (mmr == MMSYSERR_NODRIVER)
310  return MMSYSERR_NOTSUPPORTED;
311 
312  return mmr;
313 }
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
#define MMSYSERR_NODRIVER
Definition: mmsystem.h:102
#define ACMDM_DRIVER_DETAILS
Definition: msacmdrv.h:46
LONG_PTR LPARAM
Definition: windef.h:208
DWORD cbStruct
Definition: msacm.h:298
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:865
#define MMSYSERR_NOTSUPPORTED
Definition: mmsystem.h:104
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define min(a, b)
Definition: monoChain.cc:55

Referenced by acmDriverDetailsA().

◆ acmDriverEnum()

MMRESULT WINAPI acmDriverEnum ( ACMDRIVERENUMCB  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 318 of file driver.c.

320 {
321  PWINE_ACMDRIVERID padid;
322  DWORD fdwSupport;
323 
324  TRACE("(%p, %08lx, %08x)\n", fnCallback, dwInstance, fdwEnum);
325 
326  if (!fnCallback) {
327  WARN("invalid parameter\n");
328  return MMSYSERR_INVALPARAM;
329  }
330 
332  WARN("invalid flag\n");
333  return MMSYSERR_INVALFLAG;
334  }
335 
336  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
337  fdwSupport = padid->fdwSupport;
338 
340  if (fdwEnum & ACM_DRIVERENUMF_DISABLED)
342  else
343  continue;
344  }
345  if (!(*fnCallback)((HACMDRIVERID)padid, dwInstance, fdwSupport))
346  break;
347  }
348 
349  return MMSYSERR_NOERROR;
350 }
DWORD fdwSupport
Definition: wineacm.h:97
#define WARN(fmt,...)
Definition: debug.h:111
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
unsigned long DWORD
Definition: ntddk_ex.h:95
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
#define ACM_DRIVERENUMF_DISABLED
Definition: msacm.h:70
#define ACM_DRIVERENUMF_NOLOCAL
Definition: msacm.h:69

Referenced by driver_tests().

◆ acmDriverID()

MMRESULT WINAPI acmDriverID ( HACMOBJ  hao,
PHACMDRIVERID  phadid,
DWORD  fdwDriverID 
)

Definition at line 355 of file driver.c.

356 {
357  PWINE_ACMOBJ pao;
358 
359  TRACE("(%p, %p, %08x)\n", hao, phadid, fdwDriverID);
360 
361  if (fdwDriverID) {
362  WARN("invalid flag\n");
363  return MMSYSERR_INVALFLAG;
364  }
365 
367  if (!pao) {
368  WARN("invalid handle\n");
369  return MMSYSERR_INVALHANDLE;
370  }
371 
372  if (!phadid) {
373  WARN("invalid parameter\n");
374  return MMSYSERR_INVALPARAM;
375  }
376 
377  *phadid = (HACMDRIVERID) pao->pACMDriverID;
378 
379  return MMSYSERR_NOERROR;
380 }
#define WARN(fmt,...)
Definition: debug.h:111
PWINE_ACMDRIVERID pACMDriverID
Definition: wineacm.h:45
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type)
Definition: internal.c:816
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
#define WINE_ACMOBJ_DONTCARE
Definition: wineacm.h:35
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107

Referenced by acmFilterEnumW(), acmFormatEnumW(), acmFormatTagEnumW(), and DriverEnumProc().

◆ acmDriverMessage()

LRESULT WINAPI acmDriverMessage ( HACMDRIVER  had,
UINT  uMsg,
LPARAM  lParam1,
LPARAM  lParam2 
)

Definition at line 395 of file driver.c.

396 {
397  TRACE("(%p, %04x, %08lx, %08lx\n", had, uMsg, lParam1, lParam2);
398 
399  if ((uMsg >= ACMDM_USER && uMsg < ACMDM_RESERVED_LOW) ||
400  uMsg == ACMDM_DRIVER_ABOUT ||
401  uMsg == DRV_QUERYCONFIGURE ||
402  uMsg == DRV_CONFIGURE)
403  {
404  PWINE_ACMDRIVERID padid;
405  LRESULT lResult;
406  LPDRVCONFIGINFO pConfigInfo = NULL;
407  LPWSTR section_name = NULL;
408  LPWSTR alias_name = NULL;
409 
410  /* Check whether handle is an HACMDRIVERID */
411  padid = MSACM_GetDriverID((HACMDRIVERID)had);
412 
413  /* If the message is DRV_CONFIGURE, and the application provides no
414  DRVCONFIGINFO structure, msacm must supply its own.
415  */
416  if (uMsg == DRV_CONFIGURE && lParam2 == 0) {
417  LPWSTR pAlias;
418 
419  /* Get the alias from the HACMDRIVERID */
420  if (padid) {
421  pAlias = padid->pszDriverAlias;
422  if (pAlias == NULL) {
423  WARN("DRV_CONFIGURE: no alias for this driver, cannot self-supply alias\n");
424  }
425  } else {
426  FIXME("DRV_CONFIGURE: reverse lookup HACMDRIVER -> HACMDRIVERID not implemented\n");
427  pAlias = NULL;
428  }
429 
430  if (pAlias != NULL) {
431  /* DRVCONFIGINFO is only 12 bytes long, but native msacm
432  * reports a 16-byte structure to codecs, so allocate 16 bytes,
433  * just to be on the safe side.
434  */
435  const unsigned int iStructSize = 16;
436  pConfigInfo = HeapAlloc(MSACM_hHeap, 0, iStructSize);
437  if (!pConfigInfo) {
438  ERR("OOM while supplying DRVCONFIGINFO for DRV_CONFIGURE, using NULL\n");
439  } else {
440  static const WCHAR drivers32[] = {'D','r','i','v','e','r','s','3','2','\0'};
441 
442  pConfigInfo->dwDCISize = iStructSize;
443 
444  section_name = HeapAlloc(MSACM_hHeap, 0, (strlenW(drivers32) + 1) * sizeof(WCHAR));
445  if (section_name) strcpyW(section_name, drivers32);
446  pConfigInfo->lpszDCISectionName = section_name;
447  alias_name = HeapAlloc(MSACM_hHeap, 0, (strlenW(pAlias) + 1) * sizeof(WCHAR));
448  if (alias_name) strcpyW(alias_name, pAlias);
449  pConfigInfo->lpszDCIAliasName = alias_name;
450 
451  if (pConfigInfo->lpszDCISectionName == NULL || pConfigInfo->lpszDCIAliasName == NULL) {
452  HeapFree(MSACM_hHeap, 0, alias_name);
453  HeapFree(MSACM_hHeap, 0, section_name);
454  HeapFree(MSACM_hHeap, 0, pConfigInfo);
455  pConfigInfo = NULL;
456  ERR("OOM while supplying DRVCONFIGINFO for DRV_CONFIGURE, using NULL\n");
457  }
458  }
459  }
460 
461  lParam2 = (LPARAM)pConfigInfo;
462  }
463 
464  if (padid) {
465  /* Handle is really an HACMDRIVERID, must have an open session to get an HACMDRIVER */
466  if (padid->pACMDriverList != NULL) {
467  lResult = MSACM_Message((HACMDRIVER)padid->pACMDriverList, uMsg, lParam1, lParam2);
468  } else {
469  MMRESULT mmr = acmDriverOpen(&had, (HACMDRIVERID)padid, 0);
470  if (mmr != MMSYSERR_NOERROR) {
471  lResult = MMSYSERR_INVALPARAM;
472  } else {
473  lResult = acmDriverMessage(had, uMsg, lParam1, lParam2);
474  acmDriverClose(had, 0);
475  }
476  }
477  } else {
478  lResult = MSACM_Message(had, uMsg, lParam1, lParam2);
479  }
480  if (pConfigInfo) {
481  HeapFree(MSACM_hHeap, 0, alias_name);
482  HeapFree(MSACM_hHeap, 0, section_name);
483  HeapFree(MSACM_hHeap, 0, pConfigInfo);
484  }
485  return lResult;
486  }
487  WARN("invalid parameter\n");
488  return MMSYSERR_INVALPARAM;
489 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: driver.c:395
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
#define DRV_QUERYCONFIGURE
Definition: mmsystem.h:126
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
#define ACMDM_RESERVED_LOW
Definition: msacm.h:222
#define FIXME(fmt,...)
Definition: debug.h:110
HANDLE MSACM_hHeap
Definition: internal.c:45
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define ACMDM_USER
Definition: msacm.h:221
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define DRV_CONFIGURE
Definition: mmsystem.h:125
__wchar_t WCHAR
Definition: xmlstorage.h:180
LPCWSTR lpszDCISectionName
Definition: mmsystem.h:990
LPWSTR pszDriverAlias
Definition: wineacm.h:88
PWINE_ACMDRIVER pACMDriverList
Definition: wineacm.h:91
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:865
#define ERR(fmt,...)
Definition: debug.h:109
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
LPCWSTR lpszDCIAliasName
Definition: mmsystem.h:991
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:829
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG_PTR LRESULT
Definition: windef.h:209
#define HeapFree(x, y, z)
Definition: compat.h:394
#define ACMDM_DRIVER_ABOUT
Definition: msacm.h:227

Referenced by acmDriverMessage().

◆ acmDriverOpen()

MMRESULT WINAPI acmDriverOpen ( PHACMDRIVER  phad,
HACMDRIVERID  hadid,
DWORD  fdwOpen 
)

Definition at line 494 of file driver.c.

495 {
496  PWINE_ACMDRIVERID padid;
498  MMRESULT ret;
499 
500  TRACE("(%p, %p, %08u)\n", phad, hadid, fdwOpen);
501 
502  if (!phad) {
503  WARN("invalid parameter\n");
504  return MMSYSERR_INVALPARAM;
505  }
506 
507  if (fdwOpen) {
508  WARN("invalid flag\n");
509  return MMSYSERR_INVALFLAG;
510  }
511 
512  padid = MSACM_GetDriverID(hadid);
513  if (!padid) {
514  WARN("invalid handle\n");
515  return MMSYSERR_INVALHANDLE;
516  }
517 
518  pad = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVER));
519  if (!pad) {
520  WARN("no memory\n");
521  return MMSYSERR_NOMEM;
522  }
523 
524  pad->obj.dwType = WINE_ACMOBJ_DRIVER;
525  pad->obj.pACMDriverID = padid;
526  pad->hDrvr = 0;
527  pad->pLocalDrvrInst = NULL;
528 
529  if (padid->pLocalDriver == NULL)
530  {
531  ACMDRVOPENDESCW adod;
532  int len;
533  LPWSTR section_name;
534 
535  /* this is not an externally added driver... need to actually load it */
536  if (!padid->pszDriverAlias)
537  {
539  goto gotError;
540  }
541 
542  adod.cbStruct = sizeof(adod);
545  adod.dwVersion = acmGetVersion();
546  adod.dwFlags = fdwOpen;
547  adod.dwError = 0;
548  len = strlen("Drivers32") + 1;
549  section_name = HeapAlloc(MSACM_hHeap, 0, len * sizeof(WCHAR));
550  MultiByteToWideChar(CP_ACP, 0, "Drivers32", -1, section_name, len);
551  adod.pszSectionName = section_name;
552  adod.pszAliasName = padid->pszDriverAlias;
553  adod.dnDevNode = 0;
554 
555  pad->hDrvr = OpenDriver(padid->pszDriverAlias, NULL, (DWORD_PTR)&adod);
556 
557  HeapFree(MSACM_hHeap, 0, section_name);
558  if (!pad->hDrvr)
559  {
560  ret = adod.dwError;
561  if (ret == MMSYSERR_NOERROR)
563  goto gotError;
564  }
565  }
566  else
567  {
568  ACMDRVOPENDESCW adod;
569 
570  pad->hDrvr = NULL;
571 
572  adod.cbStruct = sizeof(adod);
575  adod.dwVersion = acmGetVersion();
576  adod.dwFlags = fdwOpen;
577  adod.dwError = 0;
578  adod.pszSectionName = NULL;
579  adod.pszAliasName = NULL;
580  adod.dnDevNode = 0;
581 
582  pad->pLocalDrvrInst = MSACM_OpenLocalDriver(padid->pLocalDriver, (DWORD_PTR)&adod);
583  if (!pad->pLocalDrvrInst)
584  {
585  ret = adod.dwError;
586  if (ret == MMSYSERR_NOERROR)
588  goto gotError;
589  }
590  }
591 
592  /* insert new pad at beg of list */
593  pad->pNextACMDriver = padid->pACMDriverList;
594  padid->pACMDriverList = pad;
595 
596  /* FIXME: Create a WINE_ACMDRIVER32 */
597  *phad = (HACMDRIVER)pad;
598  TRACE("%s => %p\n", debugstr_w(padid->pszDriverAlias), pad);
599 
600  return MMSYSERR_NOERROR;
601  gotError:
602  WARN("failed: ret = %08x\n", ret);
603  if (pad && !pad->hDrvr)
604  HeapFree(MSACM_hHeap, 0, pad);
605  return ret;
606 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define CP_ACP
Definition: compat.h:99
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
HDRVR WINAPI OpenDriver(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lParam)
Definition: driver.c:400
#define MMSYSERR_NOMEM
Definition: mmsystem.h:103
#define MMSYSERR_NODRIVER
Definition: mmsystem.h:102
#define debugstr_w
Definition: kernel32.h:32
HANDLE MSACM_hHeap
Definition: internal.c:45
PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER paldrv, LPARAM lParam2)
Definition: internal.c:1014
#define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED
Definition: msacm.h:59
smooth NULL
Definition: ftsmooth.c:416
FOURCC fccType
Definition: msacmdrv.h:87
DWORD dnDevNode
Definition: msacmdrv.h:94
static void pad(Char *s)
Definition: bzip2.c:908
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD WINAPI acmGetVersion(void)
Definition: msacm32_main.c:76
LPWSTR pszDriverAlias
Definition: wineacm.h:88
PWINE_ACMDRIVER pACMDriverList
Definition: wineacm.h:91
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
PWINE_ACMLOCALDRIVER pLocalDriver
Definition: wineacm.h:90
int ret
DWORD dwVersion
Definition: msacmdrv.h:89
GLenum GLsizei len
Definition: glext.h:6722
uint32_t DWORD_PTR
Definition: typedefs.h:63
LPCWSTR pszAliasName
Definition: msacmdrv.h:93
DWORD cbStruct
Definition: msacmdrv.h:86
LPCWSTR pszSectionName
Definition: msacmdrv.h:92
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define MultiByteToWideChar
Definition: compat.h:100
#define WINE_ACMOBJ_DRIVER
Definition: wineacm.h:37
FOURCC fccComp
Definition: msacmdrv.h:88
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:829
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:394
#define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC
Definition: msacm.h:58

Referenced by acmDriverDetailsW(), acmDriverMessage(), acmFilterDetailsW(), acmFilterEnumW(), acmFilterTagDetailsW(), acmFilterTagEnumW(), acmFormatDetailsW(), acmFormatEnumW(), acmFormatSuggest(), acmFormatTagDetailsW(), acmFormatTagEnumW(), acmStreamOpen(), DriverEnumProc(), FormatEnumProc(), FormatTagEnumProc(), MSACM_FillCache(), and MSACM_FillFormatTagsCB().

◆ acmDriverPriority()

MMRESULT WINAPI acmDriverPriority ( HACMDRIVERID  hadid,
DWORD  dwPriority,
DWORD  fdwPriority 
)

Definition at line 611 of file driver.c.

612 {
613 
614  TRACE("(%p, %08x, %08x)\n", hadid, dwPriority, fdwPriority);
615 
616  /* Check for unknown flags */
617  if (fdwPriority &
620  WARN("invalid flag\n");
621  return MMSYSERR_INVALFLAG;
622  }
623 
624  /* Check for incompatible flags */
625  if ((fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) &&
626  (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE)) {
627  WARN("invalid flag\n");
628  return MMSYSERR_INVALFLAG;
629  }
630 
631  /* Check for incompatible flags */
632  if ((fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) &&
633  (fdwPriority & ACM_DRIVERPRIORITYF_END)) {
634  WARN("invalid flag\n");
635  return MMSYSERR_INVALFLAG;
636  }
637 
638  /* According to MSDN, ACM_DRIVERPRIORITYF_BEGIN and ACM_DRIVERPRIORITYF_END
639  may only appear by themselves, and in addition, hadid and dwPriority must
640  both be zero */
641  if ((fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) ||
642  (fdwPriority & ACM_DRIVERPRIORITYF_END)) {
643  if (fdwPriority & ~(ACM_DRIVERPRIORITYF_BEGIN|ACM_DRIVERPRIORITYF_END)) {
644  WARN("ACM_DRIVERPRIORITYF_[BEGIN|END] cannot be used with any other flags\n");
645  return MMSYSERR_INVALPARAM;
646  }
647  if (dwPriority) {
648  WARN("priority invalid with ACM_DRIVERPRIORITYF_[BEGIN|END]\n");
649  return MMSYSERR_INVALPARAM;
650  }
651  if (hadid) {
652  WARN("non-null hadid invalid with ACM_DRIVERPRIORITYF_[BEGIN|END]\n");
653  return MMSYSERR_INVALPARAM;
654  }
655  /* FIXME: MSDN wording suggests that deferred notification should be
656  implemented as a system-wide lock held by a calling task, and that
657  re-enabling notifications should broadcast them across all processes.
658  This implementation uses a simple DWORD counter. One consequence of the
659  current implementation is that applications will never see
660  MMSYSERR_ALLOCATED as a return error.
661  */
662  if (fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) {
664  } else if (fdwPriority & ACM_DRIVERPRIORITYF_END) {
666  }
667  return MMSYSERR_NOERROR;
668  } else {
669  PWINE_ACMDRIVERID padid;
670  PWINE_ACMNOTIFYWND panwnd;
671  BOOL bPerformBroadcast = FALSE;
672 
673  /* Fetch driver ID */
674  padid = MSACM_GetDriverID(hadid);
675  panwnd = MSACM_GetNotifyWnd(hadid);
676  if (!padid && !panwnd) {
677  WARN("invalid handle\n");
678  return MMSYSERR_INVALHANDLE;
679  }
680 
681  if (padid) {
682  /* Check whether driver ID is appropriate for requested op */
683  if (dwPriority) {
685  return MMSYSERR_NOTSUPPORTED;
686  }
687  if (dwPriority != 1 && dwPriority != (DWORD)-1) {
688  FIXME("unexpected priority %d, using sign only\n", dwPriority);
689  if ((signed)dwPriority < 0) dwPriority = (DWORD)-1;
690  if (dwPriority > 0) dwPriority = 1;
691  }
692 
693  if (dwPriority == 1 && (padid->pPrevACMDriverID == NULL ||
695  /* do nothing - driver is first of list, or first after last
696  local driver */
697  } else if (dwPriority == (DWORD)-1 && padid->pNextACMDriverID == NULL) {
698  /* do nothing - driver is last of list */
699  } else {
700  MSACM_RePositionDriver(padid, dwPriority);
701  bPerformBroadcast = TRUE;
702  }
703  }
704 
705  /* Check whether driver ID should be enabled or disabled */
706  if (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE) {
709  bPerformBroadcast = TRUE;
710  }
711  } else if (fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) {
714  bPerformBroadcast = TRUE;
715  }
716  }
717  }
718 
719  if (panwnd) {
720  if (dwPriority) {
721  return MMSYSERR_NOTSUPPORTED;
722  }
723 
724  /* Check whether notify window should be enabled or disabled */
725  if (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE) {
728  bPerformBroadcast = TRUE;
729  }
730  } else if (fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) {
733  bPerformBroadcast = TRUE;
734  }
735  }
736  }
737 
738  /* Perform broadcast of changes */
739  if (bPerformBroadcast) {
742  }
743  return MMSYSERR_NOERROR;
744  }
745 }
DWORD fdwSupport
Definition: wineacm.h:97
#define TRUE
Definition: types.h:120
#define ACM_DRIVERPRIORITYF_ENABLE
Definition: msacm.h:72
void MSACM_EnableNotifications(void)
Definition: internal.c:465
#define WARN(fmt,...)
Definition: debug.h:111
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
#define DWORD
Definition: nt_native.h:44
PWINE_ACMDRIVERID pPrevACMDriverID
Definition: wineacm.h:93
void MSACM_WriteCurrentPriorities(void)
Definition: internal.c:666
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
void MSACM_BroadcastNotification(void)
Definition: internal.c:441
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
void MSACM_DisableNotifications(void)
Definition: internal.c:457
unsigned long DWORD
Definition: ntddk_ex.h:95
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
#define ACM_DRIVERPRIORITYF_END
Definition: msacm.h:76
#define MMSYSERR_NOTSUPPORTED
Definition: mmsystem.h:104
#define ACMDRIVERDETAILS_SUPPORTF_LOCAL
Definition: msacm.h:66
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
void MSACM_RePositionDriver(PWINE_ACMDRIVERID padid, DWORD dwPriority)
Definition: internal.c:502
#define ACM_DRIVERPRIORITYF_DISABLE
Definition: msacm.h:73
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
#define ACM_DRIVERPRIORITYF_BEGIN
Definition: msacm.h:75
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:829
PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver)
Definition: internal.c:845

◆ acmDriverRemove()

MMRESULT WINAPI acmDriverRemove ( HACMDRIVERID  hadid,
DWORD  fdwRemove 
)

Definition at line 750 of file driver.c.

751 {
752  PWINE_ACMDRIVERID padid;
753  PWINE_ACMNOTIFYWND panwnd;
754 
755  TRACE("(%p, %08x)\n", hadid, fdwRemove);
756 
757  padid = MSACM_GetDriverID(hadid);
758  panwnd = MSACM_GetNotifyWnd(hadid);
759  if (!padid && !panwnd) {
760  WARN("invalid handle\n");
761  return MMSYSERR_INVALHANDLE;
762  }
763 
764  if (fdwRemove) {
765  WARN("invalid flag\n");
766  return MMSYSERR_INVALFLAG;
767  }
768 
769  if (padid) MSACM_UnregisterDriver(padid);
770  if (panwnd) MSACM_UnRegisterNotificationWindow(panwnd);
772 
773  return MMSYSERR_NOERROR;
774 }
#define WARN(fmt,...)
Definition: debug.h:111
PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
Definition: internal.c:766
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
void MSACM_BroadcastNotification(void)
Definition: internal.c:441
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
PWINE_ACMNOTIFYWND MSACM_UnRegisterNotificationWindow(const WINE_ACMNOTIFYWND *panwnd)
Definition: internal.c:479
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:829
PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver)
Definition: internal.c:845

◆ acmFilterChooseA()

MMRESULT WINAPI acmFilterChooseA ( PACMFILTERCHOOSEA  pafltrc)

Definition at line 42 of file filter.c.

43 {
44  FIXME("(%p): stub\n", pafltrc);
46  return MMSYSERR_ERROR;
47 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
#define SetLastError(x)
Definition: compat.h:409
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92

◆ acmFilterChooseW()

MMRESULT WINAPI acmFilterChooseW ( PACMFILTERCHOOSEW  pafltrc)

Definition at line 52 of file filter.c.

53 {
54  FIXME("(%p): stub\n", pafltrc);
56  return MMSYSERR_ERROR;
57 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
#define SetLastError(x)
Definition: compat.h:409
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92

◆ acmFilterDetailsA()

MMRESULT WINAPI acmFilterDetailsA ( HACMDRIVER  had,
PACMFILTERDETAILSA  pafd,
DWORD  fdwDetails 
)

Definition at line 62 of file filter.c.

64 {
65  ACMFILTERDETAILSW afdw;
66  MMRESULT mmr;
67 
68  memset(&afdw, 0, sizeof(afdw));
69  afdw.cbStruct = sizeof(afdw);
70  afdw.dwFilterIndex = pafd->dwFilterIndex;
71  afdw.dwFilterTag = pafd->dwFilterTag;
72  afdw.pwfltr = pafd->pwfltr;
73  afdw.cbwfltr = pafd->cbwfltr;
74 
75  mmr = acmFilterDetailsW(had, &afdw, fdwDetails);
76  if (mmr == MMSYSERR_NOERROR) {
77  pafd->dwFilterTag = afdw.dwFilterTag;
78  pafd->fdwSupport = afdw.fdwSupport;
79  WideCharToMultiByte( CP_ACP, 0, afdw.szFilter, -1, pafd->szFilter,
80  sizeof(pafd->szFilter), NULL, NULL );
81  }
82  return mmr;
83 }
#define WideCharToMultiByte
Definition: compat.h:101
PWAVEFILTER pwfltr
Definition: msacm.h:399
DWORD dwFilterIndex
Definition: msacm.h:385
#define CP_ACP
Definition: compat.h:99
CHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS]
Definition: msacm.h:390
UINT MMRESULT
Definition: mmsystem.h:962
DWORD dwFilterTag
Definition: msacm.h:386
PWAVEFILTER pwfltr
Definition: msacm.h:388
smooth NULL
Definition: ftsmooth.c:416
MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails)
Definition: filter.c:88
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
DWORD fdwSupport
Definition: msacm.h:387
WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS]
Definition: msacm.h:401
DWORD dwFilterTag
Definition: msacm.h:397
DWORD dwFilterIndex
Definition: msacm.h:396
#define memset(x, y, z)
Definition: compat.h:39
DWORD cbStruct
Definition: msacm.h:395
DWORD fdwSupport
Definition: msacm.h:398

◆ acmFilterDetailsW()

MMRESULT WINAPI acmFilterDetailsW ( HACMDRIVER  had,
PACMFILTERDETAILSW  pafd,
DWORD  fdwDetails 
)

Definition at line 88 of file filter.c.

90 {
91  MMRESULT mmr;
93 
94  TRACE("(%p, %p, %d)\n", had, pafd, fdwDetails);
95 
96  memset(&aftd, 0, sizeof(aftd));
97  aftd.cbStruct = sizeof(aftd);
98 
99  if (pafd->cbStruct < sizeof(*pafd)) return MMSYSERR_INVALPARAM;
100 
101  switch (fdwDetails) {
103  if (pafd->dwFilterTag != pafd->pwfltr->dwFilterTag) {
104  mmr = MMSYSERR_INVALPARAM;
105  break;
106  }
107  if (had == NULL) {
108  PWINE_ACMDRIVERID padid;
109 
110  mmr = ACMERR_NOTPOSSIBLE;
111  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
112  /* should check for codec only */
114  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
116  (LPARAM)pafd, (LPARAM)fdwDetails);
117  acmDriverClose(had, 0);
118  if (mmr == MMSYSERR_NOERROR) break;
119  }
120  }
121  } else {
122  mmr = MSACM_Message(had, ACMDM_FILTER_DETAILS, (LPARAM)pafd, fdwDetails);
123  }
124  break;
126  /* should check pafd->dwFilterIndex < aftd->cStandardFilters */
127  mmr = MSACM_Message(had, ACMDM_FILTER_DETAILS, (LPARAM)pafd, fdwDetails);
128  break;
129  default:
130  WARN("Unknown fdwDetails %08x\n", fdwDetails);
131  mmr = MMSYSERR_INVALFLAG;
132  break;
133  }
134 
135  TRACE("=> %d\n", mmr);
136  return mmr;
137 }
DWORD fdwSupport
Definition: wineacm.h:97
#define ACM_FILTERDETAILSF_INDEX
Definition: msacm.h:95
PWAVEFILTER pwfltr
Definition: msacm.h:399
#define WARN(fmt,...)
Definition: debug.h:111
DWORD dwFilterTag
Definition: mmreg.h:50
UINT MMRESULT
Definition: mmsystem.h:962
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:865
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define ACMERR_NOTPOSSIBLE
Definition: msacm.h:36
#define ACM_FILTERDETAILSF_FILTER
Definition: msacm.h:96
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
DWORD dwFilterTag
Definition: msacm.h:397
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
#define memset(x, y, z)
Definition: compat.h:39
DWORD cbStruct
Definition: msacm.h:395
#define ACMDM_FILTER_DETAILS
Definition: msacmdrv.h:56

Referenced by acmFilterDetailsA(), and MSACM_FilterEnumHelper().

◆ acmFilterEnumA()

MMRESULT WINAPI acmFilterEnumA ( HACMDRIVER  had,
PACMFILTERDETAILSA  pafd,
ACMFILTERENUMCBA  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 167 of file filter.c.

170 {
171  ACMFILTERDETAILSW afdw;
172  struct MSACM_FilterEnumWtoA_Instance afei;
173 
174  memset(&afdw, 0, sizeof(afdw));
175  afdw.cbStruct = sizeof(afdw);
177  afdw.dwFilterTag = pafda->dwFilterTag;
178  afdw.pwfltr = pafda->pwfltr;
179  afdw.cbwfltr = pafda->cbwfltr;
180 
181  afei.pafda = pafda;
182  afei.dwInstance = dwInstance;
183  afei.fnCallback = fnCallback;
184 
185  return acmFilterEnumW(had, &afdw, MSACM_FilterEnumCallbackWtoA,
186  (DWORD_PTR)&afei, fdwEnum);
187 }
PWAVEFILTER pwfltr
Definition: msacm.h:399
DWORD dwFilterIndex
Definition: msacm.h:385
DWORD dwFilterTag
Definition: msacm.h:386
PWAVEFILTER pwfltr
Definition: msacm.h:388
static BOOL CALLBACK MSACM_FilterEnumCallbackWtoA(HACMDRIVERID hadid, PACMFILTERDETAILSW pafdw, DWORD_PTR dwInstance, DWORD fdwSupport)
Definition: filter.c:145
MMRESULT WINAPI acmFilterEnumW(HACMDRIVER had, PACMFILTERDETAILSW pafd, ACMFILTERENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: filter.c:224
uint32_t DWORD_PTR
Definition: typedefs.h:63
DWORD dwFilterTag
Definition: msacm.h:397
DWORD dwFilterIndex
Definition: msacm.h:396
PACMFILTERDETAILSA pafda
Definition: filter.c:140
#define memset(x, y, z)
Definition: compat.h:39
DWORD cbStruct
Definition: msacm.h:395
ACMFILTERENUMCBA fnCallback
Definition: filter.c:142

◆ acmFilterEnumW()

MMRESULT WINAPI acmFilterEnumW ( HACMDRIVER  had,
PACMFILTERDETAILSW  pafd,
ACMFILTERENUMCBW  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 224 of file filter.c.

227 {
228  PWINE_ACMDRIVERID padid;
229  BOOL ret;
230 
231  TRACE("(%p, %p, %p, %ld, %d)\n",
232  had, pafd, fnCallback, dwInstance, fdwEnum);
233 
234  if (pafd->cbStruct < sizeof(*pafd)) return MMSYSERR_INVALPARAM;
235 
236  if (fdwEnum & ~(ACM_FILTERENUMF_DWFILTERTAG))
237  FIXME("Unsupported fdwEnum values\n");
238 
239  if (had) {
240  HACMDRIVERID hadid;
241 
242  if (acmDriverID((HACMOBJ)had, &hadid, 0) != MMSYSERR_NOERROR)
243  return MMSYSERR_INVALHANDLE;
244  MSACM_FilterEnumHelper(MSACM_GetDriverID(hadid), had, pafd,
245  fnCallback, dwInstance, fdwEnum);
246  return MMSYSERR_NOERROR;
247  }
248  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
249  /* should check for codec only */
251  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) != MMSYSERR_NOERROR)
252  continue;
253  ret = MSACM_FilterEnumHelper(padid, had, pafd,
254  fnCallback, dwInstance, fdwEnum);
255  acmDriverClose(had, 0);
256  if (!ret) break;
257  }
258  return MMSYSERR_NOERROR;
259 }
DWORD fdwSupport
Definition: wineacm.h:97
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
static BOOL MSACM_FilterEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, PACMFILTERDETAILSW pafd, ACMFILTERENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: filter.c:189
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:110
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID)
Definition: driver.c:355
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
int ret
#define ACM_FILTERENUMF_DWFILTERTAG
Definition: msacm.h:106
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:829
DWORD cbStruct
Definition: msacm.h:395
ACMFILTERENUMCBA fnCallback
Definition: filter.c:142

Referenced by acmFilterEnumA().

◆ acmFilterTagDetailsA()

MMRESULT WINAPI acmFilterTagDetailsA ( HACMDRIVER  had,
PACMFILTERTAGDETAILSA  paftd,
DWORD  fdwDetails 
)

Definition at line 264 of file filter.c.

266 {
267  ACMFILTERTAGDETAILSW aftdw;
268  MMRESULT mmr;
269 
270  memset(&aftdw, 0, sizeof(aftdw));
271  aftdw.cbStruct = sizeof(aftdw);
272  aftdw.dwFilterTagIndex = paftda->dwFilterTagIndex;
273  aftdw.dwFilterTag = paftda->dwFilterTag;
274 
275  mmr = acmFilterTagDetailsW(had, &aftdw, fdwDetails);
276  if (mmr == MMSYSERR_NOERROR) {
277  paftda->dwFilterTag = aftdw.dwFilterTag;
278  paftda->dwFilterTagIndex = aftdw.dwFilterTagIndex;
279  paftda->cbFilterSize = aftdw.cbFilterSize;
280  paftda->fdwSupport = aftdw.fdwSupport;
281  paftda->cStandardFilters = aftdw.cStandardFilters;
282  WideCharToMultiByte( CP_ACP, 0, aftdw.szFilterTag, -1, paftda->szFilterTag,
283  sizeof(paftda->szFilterTag), NULL, NULL );
284  }
285  return mmr;
286 }
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
DWORD cStandardFilters
Definition: msacm.h:426
DWORD dwFilterTagIndex
Definition: msacm.h:422
UINT MMRESULT
Definition: mmsystem.h:962
smooth NULL
Definition: ftsmooth.c:416
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]
Definition: msacm.h:427
#define memset(x, y, z)
Definition: compat.h:39
MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails)
Definition: filter.c:291

◆ acmFilterTagDetailsW()

MMRESULT WINAPI acmFilterTagDetailsW ( HACMDRIVER  had,
PACMFILTERTAGDETAILSW  paftd,
DWORD  fdwDetails 
)

Definition at line 291 of file filter.c.

293 {
294  PWINE_ACMDRIVERID padid;
295  MMRESULT mmr;
296 
297  TRACE("(%p, %p, %d)\n", had, paftd, fdwDetails);
298 
301  return MMSYSERR_INVALFLAG;
302 
303  switch (fdwDetails) {
305  if (had == NULL) {
306  mmr = ACMERR_NOTPOSSIBLE;
307  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
308  /* should check for codec only */
310  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
311  mmr = MSACM_Message(had, ACMDM_FILTERTAG_DETAILS, (LPARAM)paftd, fdwDetails);
312  acmDriverClose(had, 0);
313  if (mmr == MMSYSERR_NOERROR) break;
314  }
315  }
316  } else {
317  mmr = MSACM_Message(had, ACMDM_FILTERTAG_DETAILS, (LPARAM)paftd, fdwDetails);
318  }
319  break;
320 
322  /* FIXME should check paftd->dwFilterTagIndex < add.cFilterTags */
323  mmr = MSACM_Message(had, ACMDM_FILTERTAG_DETAILS, (LPARAM)paftd, fdwDetails);
324  break;
325 
327  if (had == NULL) {
329  DWORD ft = paftd->dwFilterTag;
330 
331  mmr = ACMERR_NOTPOSSIBLE;
332  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
333  /* should check for codec only */
334  if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
335  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
336 
337  memset(&tmp, 0, sizeof(tmp));
338  tmp.cbStruct = sizeof(tmp);
339  tmp.dwFilterTag = ft;
340 
342  (LPARAM)&tmp, fdwDetails) == MMSYSERR_NOERROR) {
343  if (mmr == ACMERR_NOTPOSSIBLE ||
344  paftd->cbFilterSize < tmp.cbFilterSize) {
345  *paftd = tmp;
346  mmr = MMSYSERR_NOERROR;
347  }
348  }
349  acmDriverClose(had, 0);
350  }
351  }
352  } else {
353  mmr = MSACM_Message(had, ACMDM_FILTERTAG_DETAILS, (LPARAM)paftd, fdwDetails);
354  }
355  break;
356 
357  default:
358  WARN("Unsupported fdwDetails=%08x\n", fdwDetails);
359  mmr = MMSYSERR_ERROR;
360  }
361 
362  if (mmr == MMSYSERR_NOERROR &&
363  paftd->dwFilterTag == WAVE_FORMAT_PCM && paftd->szFilterTag[0] == 0)
364  MultiByteToWideChar(CP_ACP, 0, "PCM", -1, paftd->szFilterTag,
365  ARRAY_SIZE(paftd->szFilterTag));
366 
367  return mmr;
368 }
DWORD fdwSupport
Definition: wineacm.h:97
#define CP_ACP
Definition: compat.h:99
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
#define ACM_FILTERTAGDETAILSF_INDEX
Definition: msacm.h:101
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
#define WAVE_FORMAT_PCM
Definition: constants.h:425
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
#define TRACE(s)
Definition: solgame.cpp:4
#define ACM_FILTERTAGDETAILSF_LARGESTSIZE
Definition: msacm.h:103
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
unsigned long DWORD
Definition: ntddk_ex.h:95
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:865
#define ACMDM_FILTERTAG_DETAILS
Definition: msacmdrv.h:55
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define ACMERR_NOTPOSSIBLE
Definition: msacm.h:36
#define ARRAY_SIZE(a)
Definition: main.h:24
WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]
Definition: msacm.h:427
#define MultiByteToWideChar
Definition: compat.h:100
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
#define ACM_FILTERTAGDETAILSF_FILTERTAG
Definition: msacm.h:102
#define memset(x, y, z)
Definition: compat.h:39

Referenced by acmFilterTagDetailsA(), acmFilterTagEnumW(), and MSACM_FilterEnumHelper().

◆ acmFilterTagEnumA()

MMRESULT WINAPI acmFilterTagEnumA ( HACMDRIVER  had,
PACMFILTERTAGDETAILSA  paftd,
ACMFILTERTAGENUMCBA  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 400 of file filter.c.

403 {
404  ACMFILTERTAGDETAILSW aftdw;
406 
407  memset(&aftdw, 0, sizeof(aftdw));
408  aftdw.cbStruct = sizeof(aftdw);
410  aftdw.dwFilterTag = paftda->dwFilterTag;
411 
412  aftei.paftda = paftda;
413  aftei.dwInstance = dwInstance;
414  aftei.fnCallback = fnCallback;
415 
417  (DWORD_PTR)&aftei, fdwEnum);
418 }
static BOOL CALLBACK MSACM_FilterTagEnumCallbackWtoA(HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftdw, DWORD_PTR dwInstance, DWORD fdwSupport)
Definition: filter.c:376
DWORD dwFilterTagIndex
Definition: msacm.h:422
MMRESULT WINAPI acmFilterTagEnumW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, ACMFILTERTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: filter.c:423
DWORD dwFilterTagIndex
Definition: msacm.h:411
PACMFILTERTAGDETAILSA paftda
Definition: filter.c:371
ACMFILTERTAGENUMCBA fnCallback
Definition: filter.c:373
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define memset(x, y, z)
Definition: compat.h:39

◆ acmFilterTagEnumW()

MMRESULT WINAPI acmFilterTagEnumW ( HACMDRIVER  had,
PACMFILTERTAGDETAILSW  paftd,
ACMFILTERTAGENUMCBW  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 423 of file filter.c.

426 {
427  PWINE_ACMDRIVERID padid;
428  unsigned int i;
429 
430  TRACE("(%p, %p, %p, %ld, %d)\n",
431  had, paftd, fnCallback, dwInstance, fdwEnum);
432 
433  if (paftd->cbStruct < sizeof(*paftd)) return MMSYSERR_INVALPARAM;
434 
435  if (had) FIXME("had != NULL, not supported\n");
436 
437  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
438  /* should check for codec only */
440  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == MMSYSERR_NOERROR) {
441 
442  for (i = 0; i < padid->cFilterTags; i++) {
443  paftd->dwFilterTagIndex = i;
445  if (!(fnCallback)((HACMDRIVERID)padid, paftd, dwInstance, padid->fdwSupport)) {
446  padid = NULL;
447  break;
448  }
449  }
450  }
451  acmDriverClose(had, 0);
452  }
453  }
454  return MMSYSERR_NOERROR;
455 }
DWORD fdwSupport
Definition: wineacm.h:97
DWORD dwFilterTagIndex
Definition: msacm.h:422
#define ACM_FILTERTAGDETAILSF_INDEX
Definition: msacm.h:101
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
ACMFILTERTAGENUMCBA fnCallback
Definition: filter.c:373
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails)
Definition: filter.c:291

Referenced by acmFilterTagEnumA().

◆ acmFormatChooseA()

MMRESULT WINAPI acmFormatChooseA ( PACMFORMATCHOOSEA  pafmtc)

Definition at line 298 of file format.c.

299 {
300  ACMFORMATCHOOSEW afcw;
301  MMRESULT ret;
302  LPWSTR title = NULL;
303  LPWSTR name = NULL;
304  LPWSTR templ = NULL;
305  DWORD sz;
306 
307  if (pafmtc->cbStruct < sizeof(ACMFORMATCHOOSEA))
308  return MMSYSERR_INVALPARAM;
309 
310  afcw.cbStruct = sizeof(afcw);
311  afcw.fdwStyle = pafmtc->fdwStyle;
312  afcw.hwndOwner = pafmtc->hwndOwner;
313  afcw.pwfx = pafmtc->pwfx;
314  afcw.cbwfx = pafmtc->cbwfx;
315  if (pafmtc->pszTitle)
316  {
317  sz = MultiByteToWideChar(CP_ACP, 0, pafmtc->pszTitle, -1, NULL, 0);
318  if (!(title = HeapAlloc(GetProcessHeap(), 0, sz * sizeof(WCHAR))))
319  {
321  goto done;
322  }
323  MultiByteToWideChar(CP_ACP, 0, pafmtc->pszTitle, -1, title, sz);
324  }
325  afcw.pszTitle = title;
326  if (pafmtc->pszName)
327  {
328  sz = MultiByteToWideChar(CP_ACP, 0, pafmtc->pszName, -1, NULL, 0);
329  if (!(name = HeapAlloc(GetProcessHeap(), 0, sz * sizeof(WCHAR))))
330  {
332  goto done;
333  }
334  MultiByteToWideChar(CP_ACP, 0, pafmtc->pszName, -1, name, sz);
335  }
336  afcw.pszName = name;
337  afcw.cchName = pafmtc->cchName;
338  afcw.fdwEnum = pafmtc->fdwEnum;
339  afcw.pwfxEnum = pafmtc->pwfxEnum;
340  afcw.hInstance = pafmtc->hInstance;
341  if (pafmtc->pszTemplateName)
342  {
343  sz = MultiByteToWideChar(CP_ACP, 0, pafmtc->pszTemplateName, -1, NULL, 0);
344  if (!(templ = HeapAlloc(GetProcessHeap(), 0, sz * sizeof(WCHAR))))
345  {
347  goto done;
348  }
349  MultiByteToWideChar(CP_ACP, 0, pafmtc->pszTemplateName, -1, templ, sz);
350  }
351  afcw.pszTemplateName = templ;
352  /* FIXME: hook procs not supported yet */
353  if (pafmtc->pfnHook)
354  {
355  FIXME("Unsupported hook procs\n");
357  goto done;
358  }
359  ret = acmFormatChooseW(&afcw);
360  if (ret == MMSYSERR_NOERROR)
361  {
362  WideCharToMultiByte(CP_ACP, 0, afcw.szFormatTag, -1, pafmtc->szFormatTag, sizeof(pafmtc->szFormatTag),
363  NULL, NULL);
364  WideCharToMultiByte(CP_ACP, 0, afcw.szFormat, -1, pafmtc->szFormat, sizeof(pafmtc->szFormat),
365  NULL, NULL);
366  if (pafmtc->pszName)
367  WideCharToMultiByte(CP_ACP, 0, afcw.pszName, -1, pafmtc->pszName, pafmtc->cchName, NULL, NULL);
368  }
369 done:
372  HeapFree(GetProcessHeap(), 0, templ);
373  return ret;
374 }
DWORD cbStruct
Definition: msacm.h:436
#define WideCharToMultiByte
Definition: compat.h:101
DWORD cbStruct
Definition: msacm.h:462
#define CP_ACP
Definition: compat.h:99
WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]
Definition: msacm.h:472
MMRESULT WINAPI acmFormatChooseW(PACMFORMATCHOOSEW pafmtc)
Definition: format.c:379
UINT MMRESULT
Definition: mmsystem.h:962
HWND hwndOwner
Definition: msacm.h:439
LPCWSTR pszTitle
Definition: msacm.h:469
LPCSTR pszTitle
Definition: msacm.h:443
DWORD fdwStyle
Definition: msacm.h:463
#define MMSYSERR_NOMEM
Definition: mmsystem.h:103
HWND hwndOwner
Definition: msacm.h:465
PWAVEFORMATEX pwfx
Definition: msacm.h:467
#define FIXME(fmt,...)
Definition: debug.h:110
LPCWSTR pszTemplateName
Definition: msacm.h:481
smooth NULL
Definition: ftsmooth.c:416
DWORD fdwEnum
Definition: msacm.h:477
DWORD cchName
Definition: msacm.h:449
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]
Definition: msacm.h:471
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]
Definition: msacm.h:445
unsigned long DWORD
Definition: ntddk_ex.h:95
#define MMSYSERR_NOTSUPPORTED
Definition: mmsystem.h:104
int ret
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]
Definition: msacm.h:446
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
ACMFORMATCHOOSEHOOKPROCA pfnHook
Definition: msacm.h:457
DWORD cchName
Definition: msacm.h:475
PWAVEFORMATEX pwfx
Definition: msacm.h:441
HINSTANCE hInstance
Definition: msacm.h:480
PWAVEFORMATEX pwfxEnum
Definition: msacm.h:452
#define MultiByteToWideChar
Definition: compat.h:100
LPSTR pszName
Definition: msacm.h:448
DWORD fdwEnum
Definition: msacm.h:451
Definition: name.c:36
LPCSTR pszTemplateName
Definition: msacm.h:455
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LPWSTR pszName
Definition: msacm.h:474
DWORD fdwStyle
Definition: msacm.h:437
static char title[]
Definition: ps.c:92
#define HeapFree(x, y, z)
Definition: compat.h:394
HINSTANCE hInstance
Definition: msacm.h:454
LPWAVEFORMATEX pwfxEnum
Definition: msacm.h:478
GLuint const GLchar * name
Definition: glext.h:6031

◆ acmFormatChooseW()

MMRESULT WINAPI acmFormatChooseW ( PACMFORMATCHOOSEW  pafmtc)

Definition at line 379 of file format.c.

380 {
381  if (pafmtc->cbStruct < sizeof(ACMFORMATCHOOSEW))
382  return MMSYSERR_INVALPARAM;
383 
384  if (!pafmtc->pwfx)
385  return MMSYSERR_INVALPARAM;
386 
389  pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc);
390 
392  return DialogBoxParamW(pafmtc->hInstance, pafmtc->pszTemplateName,
393  pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc);
394 
396  pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc);
397 }
#define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE
Definition: msacm.h:154
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
DWORD cbStruct
Definition: msacm.h:462
#define DLG_ACMFORMATCHOOSE_ID
Definition: msacmdlg.h:23
DWORD fdwStyle
Definition: msacm.h:463
HWND hwndOwner
Definition: msacm.h:465
PWAVEFORMATEX pwfx
Definition: msacm.h:467
static INT_PTR CALLBACK FormatChooseDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: format.c:219
LPCWSTR pszTemplateName
Definition: msacm.h:481
LONG_PTR LPARAM
Definition: windef.h:208
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
HINSTANCE hInstance
Definition: msacm.h:480
#define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE
Definition: msacm.h:153
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HINSTANCE MSACM_hInstance32
Definition: msacm32_main.c:40

Referenced by acmFormatChooseA(), AVISaveOptionsFmtChoose(), and test_acmFormatChoose().

◆ acmFormatDetailsA()

MMRESULT WINAPI acmFormatDetailsA ( HACMDRIVER  had,
PACMFORMATDETAILSA  pafd,
DWORD  fdwDetails 
)

Definition at line 402 of file format.c.

404 {
405  ACMFORMATDETAILSW afdw;
406  MMRESULT mmr;
407 
408  if (!pafd)
409  return MMSYSERR_INVALPARAM;
410 
411  memset(&afdw, 0, sizeof(afdw));
412  afdw.cbStruct = sizeof(afdw);
413  afdw.dwFormatIndex = pafd->dwFormatIndex;
414  afdw.dwFormatTag = pafd->dwFormatTag;
415  afdw.fdwSupport = pafd->fdwSupport;
416  afdw.pwfx = pafd->pwfx;
417  afdw.cbwfx = pafd->cbwfx;
418 
419  mmr = acmFormatDetailsW(had, &afdw, fdwDetails);
420  if (mmr == MMSYSERR_NOERROR) {
421  pafd->dwFormatTag = afdw.dwFormatTag;
422  pafd->fdwSupport = afdw.fdwSupport;
423  WideCharToMultiByte( CP_ACP, 0, afdw.szFormat, -1,
424  pafd->szFormat, sizeof(pafd->szFormat), NULL, NULL );
425  }
426  return mmr;
427 }
PWAVEFORMATEX pwfx
Definition: msacm.h:507
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
UINT MMRESULT
Definition: mmsystem.h:962
PWAVEFORMATEX pwfx
Definition: msacm.h:496
smooth NULL
Definition: ftsmooth.c:416
DWORD dwFormatIndex
Definition: msacm.h:493
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]
Definition: msacm.h:509
DWORD dwFormatIndex
Definition: msacm.h:504
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]
Definition: msacm.h:498
DWORD fdwSupport
Definition: msacm.h:495
DWORD dwFormatTag
Definition: msacm.h:494
MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails)
Definition: format.c:432
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
DWORD fdwSupport
Definition: msacm.h:506
DWORD cbStruct
Definition: msacm.h:503
DWORD dwFormatTag
Definition: msacm.h:505
#define memset(x, y, z)
Definition: compat.h:39

Referenced by DriverEnumProc(), and FormatTagEnumProc().

◆ acmFormatDetailsW()

MMRESULT WINAPI acmFormatDetailsW ( HACMDRIVER  had,
PACMFORMATDETAILSW  pafd,
DWORD  fdwDetails 
)

Definition at line 432 of file format.c.

433 {
434  MMRESULT mmr;
435  static const WCHAR fmt1[] = {'%','d',' ','H','z',0};
436  static const WCHAR fmt2[] = {';',' ','%','d',' ','b','i','t','s',0};
437  ACMFORMATTAGDETAILSW aftd = {0};
438 
439  TRACE("(%p, %p, %d)\n", had, pafd, fdwDetails);
440 
441  if (!pafd)
442  return MMSYSERR_INVALPARAM;
443 
444  if (pafd->cbStruct < sizeof(*pafd)) return MMSYSERR_INVALPARAM;
445 
446  if (!pafd->pwfx)
447  return MMSYSERR_INVALPARAM;
448 
449  if (pafd->cbwfx < sizeof(PCMWAVEFORMAT))
450  return MMSYSERR_INVALPARAM;
451 
452  if (pafd->fdwSupport)
453  return MMSYSERR_INVALPARAM;
454 
455  if (pafd->dwFormatTag == WAVE_FORMAT_UNKNOWN)
456  return MMSYSERR_INVALPARAM;
457 
458  switch (fdwDetails) {
460  if (pafd->dwFormatTag != pafd->pwfx->wFormatTag) {
461  mmr = MMSYSERR_INVALPARAM;
462  break;
463  }
464  if (had == NULL) {
465  PWINE_ACMDRIVERID padid;
466 
467  mmr = ACMERR_NOTPOSSIBLE;
468  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
469  /* should check for codec only */
471  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
472  mmr = MSACM_Message(had, ACMDM_FORMAT_DETAILS, (LPARAM)pafd, fdwDetails);
473  acmDriverClose(had, 0);
474  if (mmr == MMSYSERR_NOERROR) break;
475  }
476  }
477  } else {
478  mmr = MSACM_Message(had, ACMDM_FORMAT_DETAILS, (LPARAM)pafd, fdwDetails);
479  }
480  break;
482  aftd.cbStruct = sizeof(aftd);
483  aftd.dwFormatTag = pafd->dwFormatTag;
485  if (mmr != MMSYSERR_NOERROR)
486  break;
487  if (pafd->dwFormatIndex >= aftd.cStandardFormats)
488  {
489  mmr = MMSYSERR_INVALPARAM;
490  break;
491  }
492  mmr = MSACM_Message(had, ACMDM_FORMAT_DETAILS, (LPARAM)pafd, fdwDetails);
493  break;
494  default:
495  WARN("Unknown fdwDetails %08x\n", fdwDetails);
496  mmr = MMSYSERR_INVALFLAG;
497  break;
498  }
499 
500  if (mmr == MMSYSERR_NOERROR && pafd->szFormat[0] == 0) {
501  wsprintfW(pafd->szFormat, fmt1, pafd->pwfx->nSamplesPerSec);
502  if (pafd->pwfx->wBitsPerSample) {
503  wsprintfW(pafd->szFormat + lstrlenW(pafd->szFormat), fmt2,
504  pafd->pwfx->wBitsPerSample);
505  }
506  MultiByteToWideChar(CP_ACP, 0, (pafd->pwfx->nChannels == 1) ? "; Mono" : "; Stereo", -1,
507  pafd->szFormat + strlenW(pafd->szFormat),
508  ARRAY_SIZE(pafd->szFormat) - strlenW(pafd->szFormat));
509  }
510 
511  TRACE("=> %d\n", mmr);
512  return mmr;
513 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
PWAVEFORMATEX pwfx
Definition: msacm.h:507
#define WAVE_FORMAT_UNKNOWN
Definition: mmreg.h:95
DWORD fdwSupport
Definition: wineacm.h:97
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define CP_ACP
Definition: compat.h:99
WORD nChannels
Definition: mmreg.h:79
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
#define lstrlenW
Definition: compat.h:407
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
#define ACM_FORMATDETAILSF_FORMAT
Definition: msacm.h:161
DWORD cStandardFormats
Definition: msacm.h:534
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
#define TRACE(s)
Definition: solgame.cpp:4
#define ACM_FORMATTAGDETAILSF_FORMATTAG
Definition: msacm.h:183
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
__wchar_t WCHAR
Definition: xmlstorage.h:180
MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails)
Definition: format.c:853
WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]
Definition: msacm.h:509
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:865
WORD wFormatTag
Definition: mmreg.h:78
DWORD dwFormatIndex
Definition: msacm.h:504
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define ACMERR_NOTPOSSIBLE
Definition: msacm.h:36
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define ARRAY_SIZE(a)
Definition: main.h:24
DWORD fdwSupport
Definition: msacm.h:506
DWORD cbStruct
Definition: msacm.h:503
#define MultiByteToWideChar
Definition: compat.h:100
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
DWORD nSamplesPerSec
Definition: mmreg.h:80
#define ACM_FORMATDETAILSF_INDEX
Definition: msacm.h:160
WORD wBitsPerSample
Definition: mmreg.h:83
DWORD dwFormatTag
Definition: msacm.h:505
#define ACMDM_FORMAT_DETAILS
Definition: msacmdrv.h:52

Referenced by acmFormatDetailsA(), acmFormatSuggest(), AVISaveOptionsUpdate(), MSACM_FillFormatTagsCB(), and MSACM_FormatEnumHelper().

◆ acmFormatEnumA()

MMRESULT WINAPI acmFormatEnumA ( HACMDRIVER  had,
PACMFORMATDETAILSA  pafd,
ACMFORMATENUMCBA  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 543 of file format.c.

546 {
547  ACMFORMATDETAILSW afdw;
548  struct MSACM_FormatEnumWtoA_Instance afei;
549 
550  if (!pafda)
551  return MMSYSERR_INVALPARAM;
552 
553  if (!fnCallback)
554  return MMSYSERR_INVALPARAM;
555 
556  if (pafda->cbStruct < sizeof(*pafda))
557  return MMSYSERR_INVALPARAM;
558 
559  memset(&afdw, 0, sizeof(afdw));
560  afdw.cbStruct = sizeof(afdw);
562  afdw.dwFormatTag = pafda->dwFormatTag;
563  afdw.fdwSupport = pafda->fdwSupport;
564  afdw.pwfx = pafda->pwfx;
565  afdw.cbwfx = pafda->cbwfx;
566 
567  afei.pafda = pafda;
568  afei.dwInstance = dwInstance;
569  afei.fnCallback = fnCallback;
570 
571  return acmFormatEnumW(had, &afdw, MSACM_FormatEnumCallbackWtoA,
572  (DWORD_PTR)&afei, fdwEnum);
573 }
PWAVEFORMATEX pwfx
Definition: msacm.h:507
DWORD cbStruct
Definition: msacm.h:492
ACMFORMATENUMCBA fnCallback
Definition: format.c:518
static BOOL CALLBACK MSACM_FormatEnumCallbackWtoA(HACMDRIVERID hadid, PACMFORMATDETAILSW pafdw, DWORD_PTR dwInstance, DWORD fdwSupport)
Definition: format.c:521
PWAVEFORMATEX pwfx
Definition: msacm.h:496
DWORD dwFormatIndex
Definition: msacm.h:493
PACMFORMATDETAILSA pafda
Definition: format.c:516
DWORD dwFormatIndex
Definition: msacm.h:504
DWORD fdwSupport
Definition: msacm.h:495
uint32_t DWORD_PTR
Definition: typedefs.h:63
DWORD dwFormatTag
Definition: msacm.h:494
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
DWORD fdwSupport
Definition: msacm.h:506
DWORD cbStruct
Definition: msacm.h:503
MMRESULT WINAPI acmFormatEnumW(HACMDRIVER had, PACMFORMATDETAILSW pafd, ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: format.c:672
DWORD dwFormatTag
Definition: msacm.h:505
#define memset(x, y, z)
Definition: compat.h:39

Referenced by DriverEnumProc().

◆ acmFormatEnumW()

MMRESULT WINAPI acmFormatEnumW ( HACMDRIVER  had,
PACMFORMATDETAILSW  pafd,
ACMFORMATENUMCBW  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 672 of file format.c.

675 {
676  PWINE_ACMDRIVERID padid;
677  WAVEFORMATEX wfxRef;
678  BOOL ret;
679  DWORD cbwfxMax;
680  MMRESULT mmr;
681 
682  TRACE("(%p, %p, %p, %ld, %d)\n",
683  had, pafd, fnCallback, dwInstance, fdwEnum);
684 
685  if (!pafd)
686  return MMSYSERR_INVALPARAM;
687 
688  if (!fnCallback)
689  return MMSYSERR_INVALPARAM;
690 
691  if (pafd->cbStruct < sizeof(*pafd))
692  return MMSYSERR_INVALPARAM;
693 
694  if (pafd->fdwSupport)
695  return MMSYSERR_INVALPARAM;
696 
697  if (!pafd->pwfx)
698  return MMSYSERR_INVALPARAM;
699 
703  wfxRef = *pafd->pwfx;
704 
705  if ((fdwEnum & ACM_FORMATENUMF_HARDWARE) &&
707  return MMSYSERR_INVALPARAM;
708 
709  if ((fdwEnum & ACM_FORMATENUMF_WFORMATTAG) &&
710  (pafd->dwFormatTag != pafd->pwfx->wFormatTag))
711  return MMSYSERR_INVALPARAM;
712 
714  FIXME("Unsupported fdwEnum values %08x\n", fdwEnum);
715 
716  mmr = acmMetrics((HACMOBJ)had, ACM_METRIC_MAX_SIZE_FORMAT, &cbwfxMax);
717  if (mmr != MMSYSERR_NOERROR)
718  return mmr;
719  if (pafd->cbwfx < cbwfxMax)
720  return MMSYSERR_INVALPARAM;
721 
722  if (had) {
723  HACMDRIVERID hadid;
724 
725  if (acmDriverID((HACMOBJ)had, &hadid, 0) != MMSYSERR_NOERROR)
726  return MMSYSERR_INVALHANDLE;
727  MSACM_FormatEnumHelper(MSACM_GetDriverID(hadid), had, pafd, &wfxRef,
728  fnCallback, dwInstance, fdwEnum);
729  return MMSYSERR_NOERROR;
730  }
731  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
732  /* should check for codec only */
734  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) != MMSYSERR_NOERROR)
735  continue;
736  ret = MSACM_FormatEnumHelper(padid, had, pafd, &wfxRef,
737  fnCallback, dwInstance, fdwEnum);
738  acmDriverClose(had, 0);
739  if (!ret) break;
740  }
741  return MMSYSERR_NOERROR;
742 }
PWAVEFORMATEX pwfx
Definition: msacm.h:507
DWORD fdwSupport
Definition: wineacm.h:97
#define ACM_FORMATENUMF_SUGGEST
Definition: msacm.h:169
#define ACM_FORMATENUMF_NCHANNELS
Definition: msacm.h:165
UINT MMRESULT
Definition: mmsystem.h:962
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
ACMFORMATENUMCBA fnCallback
Definition: format.c:518
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
#define ACM_FORMATENUMF_INPUT
Definition: msacm.h:171
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:110
MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
Definition: msacm32_main.c:106
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
#define ACM_FORMATENUMF_WFORMATTAG
Definition: msacm.h:164
MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID)
Definition: driver.c:355
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define ACM_FORMATENUMF_NSAMPLESPERSEC
Definition: msacm.h:166
unsigned long DWORD
Definition: ntddk_ex.h:95
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, PACMFORMATDETAILSW pafd, PWAVEFORMATEX pwfxRef, ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: format.c:578
WORD wFormatTag
Definition: mmreg.h:78
int ret
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define ACM_FORMATENUMF_CONVERT
Definition: msacm.h:168
#define ACM_FORMATENUMF_HARDWARE
Definition: msacm.h:170
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
DWORD fdwSupport
Definition: msacm.h:506
DWORD cbStruct
Definition: msacm.h:503
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
#define ACM_FORMATENUMF_OUTPUT
Definition: msacm.h:172
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:829
DWORD dwFormatTag
Definition: msacm.h:505
#define ACM_METRIC_MAX_SIZE_FORMAT
Definition: msacm.h:200
#define ACM_FORMATENUMF_WBITSPERSAMPLE
Definition: msacm.h:167

Referenced by acmFormatEnumA().

◆ acmFormatSuggest()

MMRESULT WINAPI acmFormatSuggest ( HACMDRIVER  had,
PWAVEFORMATEX  pwfxSrc,
PWAVEFORMATEX  pwfxDst,
DWORD  cbwfxDst,
DWORD  fdwSuggest 
)

Definition at line 747 of file format.c.

749 {
750  ACMFORMATTAGDETAILSW aftd = {0};
751  ACMDRVFORMATSUGGEST adfg;
752  MMRESULT mmr;
753 
754  TRACE("(%p, %p, %p, %d, %d)\n",
755  had, pwfxSrc, pwfxDst, cbwfxDst, fdwSuggest);
756 
757  if (!pwfxSrc || !pwfxDst)
758  return MMSYSERR_INVALPARAM;
759 
762  return MMSYSERR_INVALFLAG;
763 
764  /* if we were given PCM, try to convert to PCM */
765  if (pwfxSrc->wFormatTag == WAVE_FORMAT_PCM && !had &&
766  !(fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG))
767  {
768  ACMFORMATDETAILSW afd = {0};
769  afd.cbStruct = sizeof(afd);
771  afd.pwfx = pwfxSrc;
772  afd.cbwfx = sizeof(PCMWAVEFORMAT);
774  {
775  memcpy(pwfxDst, pwfxSrc, sizeof(PCMWAVEFORMAT));
776  return MMSYSERR_NOERROR;
777  }
778  }
779 
780  aftd.cbStruct = sizeof(aftd);
781  if (fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG)
782  aftd.dwFormatTag = pwfxDst->wFormatTag;
784  if ((fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG) && mmr == ACMERR_NOTPOSSIBLE)
785  return ACMERR_NOTPOSSIBLE;
786 
787  if (cbwfxDst < aftd.cbFormatSize)
788  return MMSYSERR_INVALPARAM;
789 
790  adfg.cbStruct = sizeof(adfg);
791  adfg.fdwSuggest = fdwSuggest;
792  adfg.pwfxSrc = pwfxSrc;
793  adfg.cbwfxSrc = (pwfxSrc->wFormatTag == WAVE_FORMAT_PCM) ?
794  sizeof(WAVEFORMATEX) : (sizeof(WAVEFORMATEX) + pwfxSrc->cbSize);
795  adfg.pwfxDst = pwfxDst;
796  adfg.cbwfxDst = cbwfxDst;
797 
798  if (had == NULL) {
799  PWINE_ACMDRIVERID padid;
800 
801  /* MS doc says: ACM finds the best suggestion.
802  * Well, first found will be the "best"
803  */
804  mmr = ACMERR_NOTPOSSIBLE;
805  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
806  /* should check for codec only */
808  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) != MMSYSERR_NOERROR)
809  continue;
810 
812  mmr = MMSYSERR_NOERROR;
813  break;
814  }
815  acmDriverClose(had, 0);
816  }
817  } else {
818  mmr = MSACM_Message(had, ACMDM_FORMAT_SUGGEST, (LPARAM)&adfg, 0L);
819  }
820  return mmr;
821 }
PWAVEFORMATEX pwfx
Definition: msacm.h:507
DWORD fdwSupport
Definition: wineacm.h:97
#define ACM_FORMATSUGGESTF_NSAMPLESPERSEC
Definition: msacm.h:176
PWAVEFORMATEX pwfxDst
Definition: msacmdrv.h:153
#define ACM_FORMATSUGGESTF_WFORMATTAG
Definition: msacm.h:174
UINT MMRESULT
Definition: mmsystem.h:962
struct tWAVEFORMATEX WAVEFORMATEX
Definition: austream.idl:23
struct pcmwaveformat_tag PCMWAVEFORMAT
#define ACMDM_FORMAT_SUGGEST
Definition: msacmdrv.h:53
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
#define WAVE_FORMAT_PCM
Definition: constants.h:425
#define ACM_FORMATDETAILSF_FORMAT
Definition: msacm.h:161
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define ACM_FORMATSUGGESTF_NCHANNELS
Definition: msacm.h:175
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails)
Definition: format.c:853
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:865
WORD wFormatTag
Definition: mmreg.h:78
static const WCHAR L[]
Definition: oid.c:1250
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ACM_FORMATTAGDETAILSF_LARGESTSIZE
Definition: msacm.h:184
#define ACMERR_NOTPOSSIBLE
Definition: msacm.h:36
MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails)
Definition: format.c:432
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
PWAVEFORMATEX pwfxSrc
Definition: msacmdrv.h:151
WORD cbSize
Definition: mmreg.h:84
DWORD cbStruct
Definition: msacm.h:503
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
DWORD dwFormatTag
Definition: msacm.h:505
#define ACM_FORMATSUGGESTF_WBITSPERSAMPLE
Definition: msacm.h:177

Referenced by AVIFILE_OpenCompressor(), AVIFILE_SaveFile(), FormatEnumProc(), FormatTagEnumProc(), and test_acmFormatSuggest().

◆ acmFormatTagDetailsA()

MMRESULT WINAPI acmFormatTagDetailsA ( HACMDRIVER  had,
PACMFORMATTAGDETAILSA  paftd,
DWORD  fdwDetails 
)

Definition at line 826 of file format.c.

828 {
829  ACMFORMATTAGDETAILSW aftdw;
830  MMRESULT mmr;
831 
832  memset(&aftdw, 0, sizeof(aftdw));
833  aftdw.cbStruct = sizeof(aftdw);
834  aftdw.dwFormatTagIndex = paftda->dwFormatTagIndex;
835  aftdw.dwFormatTag = paftda->dwFormatTag;
836 
837  mmr = acmFormatTagDetailsW(had, &aftdw, fdwDetails);
838  if (mmr == MMSYSERR_NOERROR) {
839  paftda->dwFormatTag = aftdw.dwFormatTag;
840  paftda->dwFormatTagIndex = aftdw.dwFormatTagIndex;
841  paftda->cbFormatSize = aftdw.cbFormatSize;
842  paftda->fdwSupport = aftdw.fdwSupport;
843  paftda->cStandardFormats = aftdw.cStandardFormats;
844  WideCharToMultiByte( CP_ACP, 0, aftdw.szFormatTag, -1, paftda->szFormatTag,
845  sizeof(paftda->szFormatTag), NULL, NULL );
846  }
847  return mmr;
848 }
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
UINT MMRESULT
Definition: mmsystem.h:962
DWORD cStandardFormats
Definition: msacm.h:534
smooth NULL
Definition: ftsmooth.c:416
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails)
Definition: format.c:853
DWORD dwFormatTagIndex
Definition: msacm.h:530
WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]
Definition: msacm.h:535
#define memset(x, y, z)
Definition: compat.h:39

Referenced by FormatTagEnumProc().

◆ acmFormatTagDetailsW()

MMRESULT WINAPI acmFormatTagDetailsW ( HACMDRIVER  had,
PACMFORMATTAGDETAILSW  paftd,
DWORD  fdwDetails 
)

Definition at line 853 of file format.c.

855 {
856  PWINE_ACMDRIVERID padid;
858 
859  TRACE("(%p, %p, %d)\n", had, paftd, fdwDetails);
860 
863  return MMSYSERR_INVALFLAG;
864 
865  switch (fdwDetails) {
867  if (had == NULL) {
868  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
869  /* should check for codec only */
871  MSACM_FindFormatTagInCache(padid, paftd->dwFormatTag, NULL) &&
872  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
873  mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
874  acmDriverClose(had, 0);
875  if (mmr == MMSYSERR_NOERROR) break;
876  }
877  }
878  } else {
880 
881  if (pad && MSACM_FindFormatTagInCache(pad->obj.pACMDriverID, paftd->dwFormatTag, NULL))
882  mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
883  }
884  break;
885 
887  if (had != NULL) {
889 
890  if (pad && paftd->dwFormatTagIndex < pad->obj.pACMDriverID->cFormatTags)
891  mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
892  }
893  break;
894 
896  if (had == NULL) {
898  DWORD ft = paftd->dwFormatTag;
899 
900  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
901  /* should check for codec only */
902  if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
903  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
904 
905  memset(&tmp, 0, sizeof(tmp));
906  tmp.cbStruct = sizeof(tmp);
907  tmp.dwFormatTag = ft;
908 
910  (LPARAM)&tmp, fdwDetails) == MMSYSERR_NOERROR) {
911  if (mmr == ACMERR_NOTPOSSIBLE ||
912  paftd->cbFormatSize < tmp.cbFormatSize) {
913  *paftd = tmp;
914  mmr = MMSYSERR_NOERROR;
915  }
916  }
917  acmDriverClose(had, 0);
918  }
919  }
920  } else {
921  mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
922  }
923  break;
924 
925  default:
926  WARN("Unsupported fdwDetails=%08x\n", fdwDetails);
927  mmr = MMSYSERR_ERROR;
928  }
929 
930  if (mmr == MMSYSERR_NOERROR &&
931  paftd->dwFormatTag == WAVE_FORMAT_PCM && paftd->szFormatTag[0] == 0)
932  MultiByteToWideChar(CP_ACP, 0, "PCM", -1, paftd->szFormatTag,
933  ARRAY_SIZE(paftd->szFormatTag));
934 
935  return mmr;
936 }
DWORD fdwSupport
Definition: wineacm.h:97
#define CP_ACP
Definition: compat.h:99
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
#define ACMDM_FORMATTAG_DETAILS
Definition: msacmdrv.h:51
BOOL MSACM_FindFormatTagInCache(const WINE_ACMDRIVERID *padid, DWORD fmtTag, LPDWORD idx)
Definition: internal.c:116
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
#define WAVE_FORMAT_PCM
Definition: constants.h:425
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
static void pad(Char *s)
Definition: bzip2.c:908
#define TRACE(s)
Definition: solgame.cpp:4
#define ACM_FORMATTAGDETAILSF_FORMATTAG
Definition: msacm.h:183
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
#define ACM_FORMATTAGDETAILSF_INDEX
Definition: msacm.h:182
unsigned long DWORD
Definition: ntddk_ex.h:95
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:865
PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver)
Definition: internal.c:837
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define ACM_FORMATTAGDETAILSF_LARGESTSIZE
Definition: msacm.h:184
DWORD dwFormatTagIndex
Definition: msacm.h:530
#define ACMERR_NOTPOSSIBLE
Definition: msacm.h:36
#define ARRAY_SIZE(a)
Definition: main.h:24
WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]
Definition: msacm.h:535
#define MultiByteToWideChar
Definition: compat.h:100
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
#define memset(x, y, z)
Definition: compat.h:39

Referenced by acmFormatDetailsW(), acmFormatSuggest(), acmFormatTagDetailsA(), AVISaveOptionsUpdate(), MSACM_FormatEnumHelper(), and test_acmFormatTagDetails().

◆ acmFormatTagEnumA()

MMRESULT WINAPI acmFormatTagEnumA ( HACMDRIVER  had,
PACMFORMATTAGDETAILSA  paftd,
ACMFORMATTAGENUMCBA  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 968 of file format.c.

971 {
972  ACMFORMATTAGDETAILSW aftdw;
974 
975  if (!paftda)
976  return MMSYSERR_INVALPARAM;
977 
978  if (paftda->cbStruct < sizeof(*paftda))
979  return MMSYSERR_INVALPARAM;
980 
981  if (fdwEnum != 0)
982  return MMSYSERR_INVALFLAG;
983 
984  memset(&aftdw, 0, sizeof(aftdw));
985  aftdw.cbStruct = sizeof(aftdw);
987  aftdw.dwFormatTag = paftda->dwFormatTag;
988 
989  aftei.paftda = paftda;
990  aftei.dwInstance = dwInstance;
991  aftei.fnCallback = fnCallback;
992 
994  (DWORD_PTR)&aftei, fdwEnum);
995 }
PACMFORMATTAGDETAILSA paftda
Definition: format.c:939
static BOOL CALLBACK MSACM_FormatTagEnumCallbackWtoA(HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftdw, DWORD_PTR dwInstance, DWORD fdwSupport)
Definition: format.c:944
ACMFORMATTAGENUMCBA fnCallback
Definition: format.c:941
DWORD dwFormatTagIndex
Definition: msacm.h:519
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
DWORD dwFormatTagIndex
Definition: msacm.h:530
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
MMRESULT WINAPI acmFormatTagEnumW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, ACMFORMATTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: format.c:1000
#define memset(x, y, z)
Definition: compat.h:39

Referenced by DriverEnumProc().

◆ acmFormatTagEnumW()

MMRESULT WINAPI acmFormatTagEnumW ( HACMDRIVER  had,
PACMFORMATTAGDETAILSW  paftd,
ACMFORMATTAGENUMCBW  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 1000 of file format.c.

1003 {
1004  PWINE_ACMDRIVERID padid;
1005  unsigned int i;
1006  BOOL bPcmDone = FALSE;
1007 
1008  TRACE("(%p, %p, %p, %ld, %d)\n",
1009  had, paftd, fnCallback, dwInstance, fdwEnum);
1010 
1011  if (!paftd)
1012  return MMSYSERR_INVALPARAM;
1013 
1014  if (paftd->cbStruct < sizeof(*paftd))
1015  return MMSYSERR_INVALPARAM;
1016 
1017  if (fdwEnum != 0)
1018  return MMSYSERR_INVALFLAG;
1019 
1020  /* (WS) MSDN info page says that if had != 0, then we should find
1021  * the specific driver to get its tags from. Therefore I'm removing
1022  * the FIXME call and adding a search block below. It also seems
1023  * that the lack of this functionality was the responsible for
1024  * codecs to be multiply and incorrectly listed.
1025  */
1026 
1027  /* if (had) FIXME("had != NULL, not supported\n"); */
1028 
1029  if (had) {
1030  if (acmDriverID((HACMOBJ)had, (HACMDRIVERID *)&padid, 0) != MMSYSERR_NOERROR)
1031  return MMSYSERR_INVALHANDLE;
1032 
1033  for (i = 0; i < padid->cFormatTags; i++) {
1034  paftd->dwFormatTagIndex = i;
1037  if (paftd->dwFormatTag == WAVE_FORMAT_PCM) {
1038  if (paftd->szFormatTag[0] == 0)
1039  MultiByteToWideChar(CP_ACP, 0, "PCM", -1, paftd->szFormatTag,
1040  ARRAY_SIZE(paftd->szFormatTag));
1041  /* (WS) I'm preserving this PCM hack since it seems to be
1042  * correct. Please notice this block was borrowed from
1043  * below.
1044  */
1045  if (bPcmDone) continue;
1046  bPcmDone = TRUE;
1047  }
1048  if (!(fnCallback)((HACMDRIVERID)padid, paftd, dwInstance, padid->fdwSupport))
1049  return MMSYSERR_NOERROR;
1050  }
1051  }
1052  }
1053  /* if had==0 then search for the first suitable driver */
1054  else {
1055  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
1056  /* should check for codec only */
1057  if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
1058  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == MMSYSERR_NOERROR) {
1059  for (i = 0; i < padid->cFormatTags; i++) {
1060  paftd->dwFormatTagIndex = i;
1063  if (paftd->dwFormatTag == WAVE_FORMAT_PCM) {
1064  if (paftd->szFormatTag[0] == 0)
1065  MultiByteToWideChar(CP_ACP, 0, "PCM", -1, paftd->szFormatTag,
1066  ARRAY_SIZE(paftd->szFormatTag));
1067  /* FIXME (EPP): I'm not sure this is the correct
1068  * algorithm (should make more sense to apply the same
1069  * for all already loaded formats, but this will do
1070  * for now
1071  */
1072  if (bPcmDone) continue;
1073  bPcmDone = TRUE;
1074  }
1075  if (!(fnCallback)((HACMDRIVERID)padid, paftd, dwInstance, padid->fdwSupport)) {
1076  acmDriverClose(had, 0);
1077  return MMSYSERR_NOERROR;
1078  }
1079  }
1080  }
1081  acmDriverClose(had, 0);
1082  }
1083  }
1084  }
1085  return MMSYSERR_NOERROR;
1086 }
#define TRUE
Definition: types.h:120
#define CP_ACP
Definition: compat.h:99
ACMFORMATTAGENUMCBA fnCallback
Definition: format.c:941
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
#define ACMDM_FORMATTAG_DETAILS
Definition: msacmdrv.h:51
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
#define WAVE_FORMAT_PCM
Definition: constants.h:425
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG_PTR LPARAM
Definition: windef