ReactOS  0.4.14-dev-593-g1793dcc
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 45 of file driver.c.

47 {
48  MMRESULT resultW;
49  WCHAR * driverW = NULL;
50  LPARAM lParamW = lParam;
51 
52  TRACE("(%p, %p, %08lx, %08x, %08x)\n",
53  phadid, hinstModule, lParam, dwPriority, fdwAdd);
54 
55  if (!phadid) {
56  WARN("invalid parameter\n");
57  return MMSYSERR_INVALPARAM;
58  }
59 
60  /* Check if any unknown flags */
61  if (fdwAdd &
64  WARN("invalid flag\n");
65  return MMSYSERR_INVALFLAG;
66  }
67 
68  /* Check if any incompatible flags */
69  if ((fdwAdd & ACM_DRIVERADDF_FUNCTION) &&
70  (fdwAdd & ACM_DRIVERADDF_NOTIFYHWND)) {
71  WARN("invalid flag\n");
72  return MMSYSERR_INVALFLAG;
73  }
74 
75  /* A->W translation of name */
76  if ((fdwAdd & ACM_DRIVERADDF_TYPEMASK) == ACM_DRIVERADDF_NAME) {
77  INT len;
78 
79  if (lParam == 0) return MMSYSERR_INVALPARAM;
81  driverW = HeapAlloc(MSACM_hHeap, 0, len * sizeof(WCHAR));
82  if (!driverW) return MMSYSERR_NOMEM;
83  MultiByteToWideChar(CP_ACP, 0, (LPSTR)lParam, -1, driverW, len);
84  lParamW = (LPARAM)driverW;
85  }
86 
87  resultW = acmDriverAddW(phadid, hinstModule, lParamW, dwPriority, fdwAdd);
88  HeapFree(MSACM_hHeap, 0, driverW);
89  return resultW;
90 }
#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:47
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:96
LPARAM lParam
Definition: combotst.c:139
#define HeapFree(x, y, z)
Definition: compat.h:402

Referenced by test_acmDriverAdd().

◆ acmDriverAddW()

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

Definition at line 96 of file driver.c.

98 {
99  PWINE_ACMLOCALDRIVER pLocalDrv = NULL;
100 
101  TRACE("(%p, %p, %08lx, %08x, %08x)\n",
102  phadid, hinstModule, lParam, dwPriority, fdwAdd);
103 
104  if (!phadid) {
105  WARN("invalid parameter\n");
106  return MMSYSERR_INVALPARAM;
107  }
108 
109  /* Check if any unknown flags */
110  if (fdwAdd &
113  WARN("invalid flag\n");
114  return MMSYSERR_INVALFLAG;
115  }
116 
117  /* Check if any incompatible flags */
118  if ((fdwAdd & ACM_DRIVERADDF_FUNCTION) &&
119  (fdwAdd & ACM_DRIVERADDF_NOTIFYHWND)) {
120  WARN("invalid flag\n");
121  return MMSYSERR_INVALFLAG;
122  }
123 
124  switch (fdwAdd & ACM_DRIVERADDF_TYPEMASK) {
125  case ACM_DRIVERADDF_NAME:
126  /*
127  hInstModule (unused)
128  lParam name of value in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
129  dwPriority (unused, set to 0)
130  */
131  *phadid = (HACMDRIVERID) MSACM_RegisterDriverFromRegistry((LPCWSTR)lParam);
132  if (!*phadid) {
133  ERR("Unable to register driver via ACM_DRIVERADDF_NAME\n");
134  return MMSYSERR_INVALPARAM;
135  }
136  break;
138  /*
139  hInstModule Handle of module which contains driver entry proc
140  lParam Driver function address
141  dwPriority (unused, set to 0)
142  */
143  fdwAdd &= ~ACM_DRIVERADDF_TYPEMASK;
144  /* FIXME: fdwAdd ignored */
145  /* Application-supplied acmDriverProc's are placed at the top of the priority unless
146  fdwAdd indicates ACM_DRIVERADDF_GLOBAL
147  */
148  pLocalDrv = MSACM_RegisterLocalDriver(hinstModule, (DRIVERPROC)lParam);
149  *phadid = pLocalDrv ? (HACMDRIVERID) MSACM_RegisterDriver(NULL, NULL, pLocalDrv) : NULL;
150  if (!*phadid) {
151  ERR("Unable to register driver via ACM_DRIVERADDF_FUNCTION\n");
152  return MMSYSERR_INVALPARAM;
153  }
154  break;
156  /*
157  hInstModule (unused)
158  lParam Handle of notification window
159  dwPriority Window message to send for notification broadcasts
160  */
161  *phadid = (HACMDRIVERID) MSACM_RegisterNotificationWindow((HWND)lParam, dwPriority);
162  if (!*phadid) {
163  ERR("Unable to register driver via ACM_DRIVERADDF_NOTIFYHWND\n");
164  return MMSYSERR_INVALPARAM;
165  }
166  break;
167  default:
168  ERR("invalid flag value 0x%08x for fdwAdd\n", fdwAdd);
169  return MMSYSERR_INVALFLAG;
170  }
171 
173  return MMSYSERR_NOERROR;
174 }
LRESULT(CALLBACK * DRIVERPROC)(DWORD_PTR, HDRVR, UINT, LPARAM, LPARAM)
Definition: mmsystem.h:1001
PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc)
Definition: internal.c:883
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:443
#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:285
#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:416
#define ACM_DRIVERADDF_NAME
Definition: msacm.h:45
LPARAM lParam
Definition: combotst.c:139
PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry)
Definition: internal.c:61

Referenced by acmDriverAddA().

◆ acmDriverClose()

MMRESULT WINAPI acmDriverClose ( HACMDRIVER  had,
DWORD  fdwClose 
)

Definition at line 179 of file driver.c.

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

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 223 of file driver.c.

224 {
225  MMRESULT mmr;
226  ACMDRIVERDETAILSW addw;
227 
228  TRACE("(%p, %p, %08x)\n", hadid, padd, fdwDetails);
229 
230  if (!padd) {
231  WARN("invalid parameter\n");
232  return MMSYSERR_INVALPARAM;
233  }
234 
235  if (padd->cbStruct < 4) {
236  WARN("invalid parameter\n");
237  return MMSYSERR_INVALPARAM;
238  }
239 
240  addw.cbStruct = sizeof(addw);
241  mmr = acmDriverDetailsW(hadid, &addw, fdwDetails);
242  if (mmr == 0) {
243  ACMDRIVERDETAILSA padda;
244 
245  padda.fccType = addw.fccType;
246  padda.fccComp = addw.fccComp;
247  padda.wMid = addw.wMid;
248  padda.wPid = addw.wPid;
249  padda.vdwACM = addw.vdwACM;
250  padda.vdwDriver = addw.vdwDriver;
251  padda.fdwSupport = addw.fdwSupport;
252  padda.cFormatTags = addw.cFormatTags;
253  padda.cFilterTags = addw.cFilterTags;
254  padda.hicon = addw.hicon;
255  WideCharToMultiByte( CP_ACP, 0, addw.szShortName, -1, padda.szShortName,
256  sizeof(padda.szShortName), NULL, NULL );
257  WideCharToMultiByte( CP_ACP, 0, addw.szLongName, -1, padda.szLongName,
258  sizeof(padda.szLongName), NULL, NULL );
259  WideCharToMultiByte( CP_ACP, 0, addw.szCopyright, -1, padda.szCopyright,
260  sizeof(padda.szCopyright), NULL, NULL );
261  WideCharToMultiByte( CP_ACP, 0, addw.szLicensing, -1, padda.szLicensing,
262  sizeof(padda.szLicensing), NULL, NULL );
263  WideCharToMultiByte( CP_ACP, 0, addw.szFeatures, -1, padda.szFeatures,
264  sizeof(padda.szFeatures), NULL, NULL );
265  padda.cbStruct = min(padd->cbStruct, sizeof(*padd));
266  memcpy(padd, &padda, padda.cbStruct);
267  }
268  return mmr;
269 }
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:274
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 274 of file driver.c.

275 {
276  HACMDRIVER acmDrvr;
277  MMRESULT mmr;
278 
279  TRACE("(%p, %p, %08x)\n", hadid, padd, fdwDetails);
280 
281  if (!padd) {
282  WARN("invalid parameter\n");
283  return MMSYSERR_INVALPARAM;
284  }
285 
286  if (padd->cbStruct < 4) {
287  WARN("invalid parameter\n");
288  return MMSYSERR_INVALPARAM;
289  }
290 
291  if (fdwDetails) {
292  WARN("invalid flag\n");
293  return MMSYSERR_INVALFLAG;
294  }
295 
296  mmr = acmDriverOpen(&acmDrvr, hadid, 0);
297  if (mmr == MMSYSERR_NOERROR) {
298  ACMDRIVERDETAILSW paddw;
299  paddw.cbStruct = sizeof(paddw);
300  mmr = MSACM_Message(acmDrvr, ACMDM_DRIVER_DETAILS, (LPARAM)&paddw, 0);
301 
302  acmDriverClose(acmDrvr, 0);
303  paddw.cbStruct = min(padd->cbStruct, sizeof(*padd));
304  memcpy(padd, &paddw, paddw.cbStruct);
305  }
306  else if (mmr == MMSYSERR_NODRIVER)
307  return MMSYSERR_NOTSUPPORTED;
308 
309  return mmr;
310 }
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:179
#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:491
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:872
#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 315 of file driver.c.

317 {
318  PWINE_ACMDRIVERID padid;
319  DWORD fdwSupport;
320 
321  TRACE("(%p, %08lx, %08x)\n", fnCallback, dwInstance, fdwEnum);
322 
323  if (!fnCallback) {
324  WARN("invalid parameter\n");
325  return MMSYSERR_INVALPARAM;
326  }
327 
329  WARN("invalid flag\n");
330  return MMSYSERR_INVALFLAG;
331  }
332 
333  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
334  fdwSupport = padid->fdwSupport;
335 
337  if (fdwEnum & ACM_DRIVERENUMF_DISABLED)
339  else
340  continue;
341  }
342  if (!(*fnCallback)((HACMDRIVERID)padid, dwInstance, fdwSupport))
343  break;
344  }
345 
346  return MMSYSERR_NOERROR;
347 }
DWORD fdwSupport
Definition: wineacm.h:98
#define WARN(fmt,...)
Definition: debug.h:111
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:93
#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:48
#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 352 of file driver.c.

353 {
354  PWINE_ACMOBJ pao;
355 
356  TRACE("(%p, %p, %08x)\n", hao, phadid, fdwDriverID);
357 
358  if (fdwDriverID) {
359  WARN("invalid flag\n");
360  return MMSYSERR_INVALFLAG;
361  }
362 
364  if (!pao) {
365  WARN("invalid handle\n");
366  return MMSYSERR_INVALHANDLE;
367  }
368 
369  if (!phadid) {
370  WARN("invalid parameter\n");
371  return MMSYSERR_INVALPARAM;
372  }
373 
374  *phadid = (HACMDRIVERID) pao->pACMDriverID;
375 
376  return MMSYSERR_NOERROR;
377 }
#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:823
#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 392 of file driver.c.

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

Referenced by acmDriverMessage().

◆ acmDriverOpen()

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

Definition at line 491 of file driver.c.

492 {
493  PWINE_ACMDRIVERID padid;
494  PWINE_ACMDRIVER pad = NULL;
495  MMRESULT ret;
496 
497  TRACE("(%p, %p, %08u)\n", phad, hadid, fdwOpen);
498 
499  if (!phad) {
500  WARN("invalid parameter\n");
501  return MMSYSERR_INVALPARAM;
502  }
503 
504  if (fdwOpen) {
505  WARN("invalid flag\n");
506  return MMSYSERR_INVALFLAG;
507  }
508 
509  padid = MSACM_GetDriverID(hadid);
510  if (!padid) {
511  WARN("invalid handle\n");
512  return MMSYSERR_INVALHANDLE;
513  }
514 
515  pad = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVER));
516  if (!pad) {
517  WARN("no memory\n");
518  return MMSYSERR_NOMEM;
519  }
520 
522  pad->obj.pACMDriverID = padid;
523  pad->hDrvr = 0;
524  pad->pLocalDrvrInst = NULL;
525 
526  if (padid->pLocalDriver == NULL)
527  {
528  ACMDRVOPENDESCW adod;
529  int len;
530  LPWSTR section_name;
531 
532  /* this is not an externally added driver... need to actually load it */
533  if (!padid->pszDriverAlias)
534  {
536  goto gotError;
537  }
538 
539  adod.cbStruct = sizeof(adod);
542  adod.dwVersion = acmGetVersion();
543  adod.dwFlags = fdwOpen;
544  adod.dwError = 0;
545  len = strlen("Drivers32") + 1;
546  section_name = HeapAlloc(MSACM_hHeap, 0, len * sizeof(WCHAR));
547  MultiByteToWideChar(CP_ACP, 0, "Drivers32", -1, section_name, len);
548  adod.pszSectionName = section_name;
549  adod.pszAliasName = padid->pszDriverAlias;
550  adod.dnDevNode = 0;
551 
552  pad->hDrvr = OpenDriver(padid->pszDriverAlias, NULL, (DWORD_PTR)&adod);
553 
554  HeapFree(MSACM_hHeap, 0, section_name);
555  if (!pad->hDrvr)
556  {
557  ret = adod.dwError;
558  if (ret == MMSYSERR_NOERROR)
560  goto gotError;
561  }
562  }
563  else
564  {
565  ACMDRVOPENDESCW adod;
566 
567  pad->hDrvr = NULL;
568 
569  adod.cbStruct = sizeof(adod);
572  adod.dwVersion = acmGetVersion();
573  adod.dwFlags = fdwOpen;
574  adod.dwError = 0;
575  adod.pszSectionName = NULL;
576  adod.pszAliasName = NULL;
577  adod.dnDevNode = 0;
578 
580  if (!pad->pLocalDrvrInst)
581  {
582  ret = adod.dwError;
583  if (ret == MMSYSERR_NOERROR)
585  goto gotError;
586  }
587  }
588 
589  /* insert new pad at beg of list */
590  pad->pNextACMDriver = padid->pACMDriverList;
591  padid->pACMDriverList = pad;
592 
593  /* FIXME: Create a WINE_ACMDRIVER32 */
594  *phad = (HACMDRIVER)pad;
595  TRACE("%s => %p\n", debugstr_w(padid->pszDriverAlias), pad);
596 
597  return MMSYSERR_NOERROR;
598  gotError:
599  WARN("failed: ret = %08x\n", ret);
600  HeapFree(MSACM_hHeap, 0, pad);
601  return ret;
602 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
HDRVR hDrvr
Definition: wineacm.h:72
#define CP_ACP
Definition: compat.h:99
#define WARN(fmt,...)
Definition: debug.h:111
PWINE_ACMDRIVERID pACMDriverID
Definition: wineacm.h:45
DWORD dwType
Definition: wineacm.h:44
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:47
PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER paldrv, LPARAM lParam2)
Definition: internal.c:1026
#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
#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:89
PWINE_ACMDRIVER pACMDriverList
Definition: wineacm.h:92
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
PWINE_ACMLOCALDRIVER pLocalDriver
Definition: wineacm.h:91
int ret
WINE_ACMOBJ obj
Definition: wineacm.h:71
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:836
WCHAR * LPWSTR
Definition: xmlstorage.h:184
PWINE_ACMDRIVER pNextACMDriver
Definition: wineacm.h:75
#define HeapFree(x, y, z)
Definition: compat.h:402
#define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC
Definition: msacm.h:58
PWINE_ACMLOCALDRIVERINST pLocalDrvrInst
Definition: wineacm.h:73

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 607 of file driver.c.

608 {
609 
610  TRACE("(%p, %08x, %08x)\n", hadid, dwPriority, fdwPriority);
611 
612  /* Check for unknown flags */
613  if (fdwPriority &
616  WARN("invalid flag\n");
617  return MMSYSERR_INVALFLAG;
618  }
619 
620  /* Check for incompatible flags */
621  if ((fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) &&
622  (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE)) {
623  WARN("invalid flag\n");
624  return MMSYSERR_INVALFLAG;
625  }
626 
627  /* Check for incompatible flags */
628  if ((fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) &&
629  (fdwPriority & ACM_DRIVERPRIORITYF_END)) {
630  WARN("invalid flag\n");
631  return MMSYSERR_INVALFLAG;
632  }
633 
634  /* According to MSDN, ACM_DRIVERPRIORITYF_BEGIN and ACM_DRIVERPRIORITYF_END
635  may only appear by themselves, and in addition, hadid and dwPriority must
636  both be zero */
637  if ((fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) ||
638  (fdwPriority & ACM_DRIVERPRIORITYF_END)) {
639  if (fdwPriority & ~(ACM_DRIVERPRIORITYF_BEGIN|ACM_DRIVERPRIORITYF_END)) {
640  WARN("ACM_DRIVERPRIORITYF_[BEGIN|END] cannot be used with any other flags\n");
641  return MMSYSERR_INVALPARAM;
642  }
643  if (dwPriority) {
644  WARN("priority invalid with ACM_DRIVERPRIORITYF_[BEGIN|END]\n");
645  return MMSYSERR_INVALPARAM;
646  }
647  if (hadid) {
648  WARN("non-null hadid invalid with ACM_DRIVERPRIORITYF_[BEGIN|END]\n");
649  return MMSYSERR_INVALPARAM;
650  }
651  /* FIXME: MSDN wording suggests that deferred notification should be
652  implemented as a system-wide lock held by a calling task, and that
653  re-enabling notifications should broadcast them across all processes.
654  This implementation uses a simple DWORD counter. One consequence of the
655  current implementation is that applications will never see
656  MMSYSERR_ALLOCATED as a return error.
657  */
658  if (fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) {
660  } else if (fdwPriority & ACM_DRIVERPRIORITYF_END) {
662  }
663  return MMSYSERR_NOERROR;
664  } else {
665  PWINE_ACMDRIVERID padid;
666  PWINE_ACMNOTIFYWND panwnd;
667  BOOL bPerformBroadcast = FALSE;
668 
669  /* Fetch driver ID */
670  padid = MSACM_GetDriverID(hadid);
671  panwnd = MSACM_GetNotifyWnd(hadid);
672  if (!padid && !panwnd) {
673  WARN("invalid handle\n");
674  return MMSYSERR_INVALHANDLE;
675  }
676 
677  if (padid) {
678  /* Check whether driver ID is appropriate for requested op */
679  if (dwPriority) {
681  return MMSYSERR_NOTSUPPORTED;
682  }
683  if (dwPriority != 1 && dwPriority != (DWORD)-1) {
684  FIXME("unexpected priority %d, using sign only\n", dwPriority);
685  if ((signed)dwPriority < 0) dwPriority = (DWORD)-1;
686  if (dwPriority > 0) dwPriority = 1;
687  }
688 
689  if (dwPriority == 1 && (padid->pPrevACMDriverID == NULL ||
691  /* do nothing - driver is first of list, or first after last
692  local driver */
693  } else if (dwPriority == (DWORD)-1 && padid->pNextACMDriverID == NULL) {
694  /* do nothing - driver is last of list */
695  } else {
696  MSACM_RePositionDriver(padid, dwPriority);
697  bPerformBroadcast = TRUE;
698  }
699  }
700 
701  /* Check whether driver ID should be enabled or disabled */
702  if (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE) {
705  bPerformBroadcast = TRUE;
706  }
707  } else if (fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) {
710  bPerformBroadcast = TRUE;
711  }
712  }
713  }
714 
715  if (panwnd) {
716  if (dwPriority) {
717  return MMSYSERR_NOTSUPPORTED;
718  }
719 
720  /* Check whether notify window should be enabled or disabled */
721  if (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE) {
724  bPerformBroadcast = TRUE;
725  }
726  } else if (fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) {
729  bPerformBroadcast = TRUE;
730  }
731  }
732  }
733 
734  /* Perform broadcast of changes */
735  if (bPerformBroadcast) {
738  }
739  return MMSYSERR_NOERROR;
740  }
741 }
DWORD fdwSupport
Definition: wineacm.h:98
#define TRUE
Definition: types.h:120
#define ACM_DRIVERPRIORITYF_ENABLE
Definition: msacm.h:72
void MSACM_EnableNotifications(void)
Definition: internal.c:467
#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:94
void MSACM_WriteCurrentPriorities(void)
Definition: internal.c:668
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:93
void MSACM_BroadcastNotification(void)
Definition: internal.c:443
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
void MSACM_DisableNotifications(void)
Definition: internal.c:459
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:504
#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:836
PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver)
Definition: internal.c:852

◆ acmDriverRemove()

MMRESULT WINAPI acmDriverRemove ( HACMDRIVERID  hadid,
DWORD  fdwRemove 
)

Definition at line 746 of file driver.c.

747 {
748  PWINE_ACMDRIVERID padid;
749  PWINE_ACMNOTIFYWND panwnd;
750 
751  TRACE("(%p, %08x)\n", hadid, fdwRemove);
752 
753  padid = MSACM_GetDriverID(hadid);
754  panwnd = MSACM_GetNotifyWnd(hadid);
755  if (!padid && !panwnd) {
756  WARN("invalid handle\n");
757  return MMSYSERR_INVALHANDLE;
758  }
759 
760  if (fdwRemove) {
761  WARN("invalid flag\n");
762  return MMSYSERR_INVALFLAG;
763  }
764 
765  if (padid) MSACM_UnregisterDriver(padid);
766  if (panwnd) MSACM_UnRegisterNotificationWindow(panwnd);
768 
769  return MMSYSERR_NOERROR;
770 }
#define WARN(fmt,...)
Definition: debug.h:111
PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
Definition: internal.c:773
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
void MSACM_BroadcastNotification(void)
Definition: internal.c:443
#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:481
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:836
PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver)
Definition: internal.c:852

◆ 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:417
#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:417
#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:98
#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:179
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:93
#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:491
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:872
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:48
#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:98
#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:179
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:110
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:93
MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID)
Definition: driver.c:352
#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:491
int ret
#define ACM_FILTERENUMF_DWFILTERTAG
Definition: msacm.h:106
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:48
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:836
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:98
#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:179
#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:93
#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:491
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:872
#define ACMDM_FILTERTAG_DETAILS
Definition: msacmdrv.h:55
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:48
#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:98
DWORD dwFilterTagIndex
Definition: msacm.h:422
#define ACM_FILTERTAGDETAILSF_INDEX
Definition: msacm.h:101
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:179
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:93
#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:491
ACMFILTERTAGENUMCBA fnCallback
Definition: filter.c:373
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:48
#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 297 of file format.c.

298 {
299  ACMFORMATCHOOSEW afcw;
300  MMRESULT ret;
301  LPWSTR title = NULL;
302  LPWSTR name = NULL;
303  LPWSTR templ = NULL;
304  DWORD sz;
305 
306  if (pafmtc->cbStruct < sizeof(ACMFORMATCHOOSEA))
307  return MMSYSERR_INVALPARAM;
308 
309  afcw.cbStruct = sizeof(afcw);
310  afcw.fdwStyle = pafmtc->fdwStyle;
311  afcw.hwndOwner = pafmtc->hwndOwner;
312  afcw.pwfx = pafmtc->pwfx;
313  afcw.cbwfx = pafmtc->cbwfx;
314  if (pafmtc->pszTitle)
315  {
316  sz = MultiByteToWideChar(CP_ACP, 0, pafmtc->pszTitle, -1, NULL, 0);
317  if (!(title = HeapAlloc(GetProcessHeap(), 0, sz * sizeof(WCHAR))))
318  {
320  goto done;
321  }
322  MultiByteToWideChar(CP_ACP, 0, pafmtc->pszTitle, -1, title, sz);
323  }
324  afcw.pszTitle = title;
325  if (pafmtc->pszName)
326  {
327  sz = MultiByteToWideChar(CP_ACP, 0, pafmtc->pszName, -1, NULL, 0);
328  if (!(name = HeapAlloc(GetProcessHeap(), 0, sz * sizeof(WCHAR))))
329  {
331  goto done;
332  }
333  MultiByteToWideChar(CP_ACP, 0, pafmtc->pszName, -1, name, sz);
334  }
335  afcw.pszName = name;
336  afcw.cchName = pafmtc->cchName;
337  afcw.fdwEnum = pafmtc->fdwEnum;
338  afcw.pwfxEnum = pafmtc->pwfxEnum;
339  afcw.hInstance = pafmtc->hInstance;
340  if (pafmtc->pszTemplateName)
341  {
342  sz = MultiByteToWideChar(CP_ACP, 0, pafmtc->pszTemplateName, -1, NULL, 0);
343  if (!(templ = HeapAlloc(GetProcessHeap(), 0, sz * sizeof(WCHAR))))
344  {
346  goto done;
347  }
348  MultiByteToWideChar(CP_ACP, 0, pafmtc->pszTemplateName, -1, templ, sz);
349  }
350  afcw.pszTemplateName = templ;
351  /* FIXME: hook procs not supported yet */
352  if (pafmtc->pfnHook)
353  {
354  FIXME("Unsupported hook procs\n");
356  goto done;
357  }
358  ret = acmFormatChooseW(&afcw);
359  if (ret == MMSYSERR_NOERROR)
360  {
361  WideCharToMultiByte(CP_ACP, 0, afcw.szFormatTag, -1, pafmtc->szFormatTag, sizeof(pafmtc->szFormatTag),
362  NULL, NULL);
363  WideCharToMultiByte(CP_ACP, 0, afcw.szFormat, -1, pafmtc->szFormat, sizeof(pafmtc->szFormat),
364  NULL, NULL);
365  if (pafmtc->pszName)
366  WideCharToMultiByte(CP_ACP, 0, afcw.pszName, -1, pafmtc->pszName, pafmtc->cchName, NULL, NULL);
367  }
368 done:
371  HeapFree(GetProcessHeap(), 0, templ);
372  return ret;
373 }
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:378
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:403
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:38
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:402
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 378 of file format.c.

379 {
380  if (pafmtc->cbStruct < sizeof(ACMFORMATCHOOSEW))
381  return MMSYSERR_INVALPARAM;
382 
383  if (!pafmtc->pwfx)
384  return MMSYSERR_INVALPARAM;
385 
388  pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc);
389 
391  return DialogBoxParamW(pafmtc->hInstance, pafmtc->pszTemplateName,
392  pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc);
393 
395  pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc);
396 }
#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:218
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 401 of file format.c.

403 {
404  ACMFORMATDETAILSW afdw;
405  MMRESULT mmr;
406 
407  if (!pafd)
408  return MMSYSERR_INVALPARAM;
409 
410  memset(&afdw, 0, sizeof(afdw));
411  afdw.cbStruct = sizeof(afdw);
412  afdw.dwFormatIndex = pafd->dwFormatIndex;
413  afdw.dwFormatTag = pafd->dwFormatTag;
414  afdw.fdwSupport = pafd->fdwSupport;
415  afdw.pwfx = pafd->pwfx;
416  afdw.cbwfx = pafd->cbwfx;
417 
418  mmr = acmFormatDetailsW(had, &afdw, fdwDetails);
419  if (mmr == MMSYSERR_NOERROR) {
420  pafd->dwFormatTag = afdw.dwFormatTag;
421  pafd->fdwSupport = afdw.fdwSupport;
422  WideCharToMultiByte( CP_ACP, 0, afdw.szFormat, -1,
423  pafd->szFormat, sizeof(pafd->szFormat), NULL, NULL );
424  }
425  return mmr;
426 }
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:431
#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 431 of file format.c.

432 {
433  MMRESULT mmr;
434  static const WCHAR fmt1[] = {'%','d',' ','H','z',0};
435  static const WCHAR fmt2[] = {';',' ','%','d',' ','b','i','t','s',0};
436  ACMFORMATTAGDETAILSW aftd = {0};
437 
438  TRACE("(%p, %p, %d)\n", had, pafd, fdwDetails);
439 
440  if (!pafd)
441  return MMSYSERR_INVALPARAM;
442 
443  if (pafd->cbStruct < sizeof(*pafd)) return MMSYSERR_INVALPARAM;
444 
445  if (!pafd->pwfx)
446  return MMSYSERR_INVALPARAM;
447 
448  if (pafd->cbwfx < sizeof(PCMWAVEFORMAT))
449  return MMSYSERR_INVALPARAM;
450 
451  if (pafd->fdwSupport)
452  return MMSYSERR_INVALPARAM;
453 
454  if (pafd->dwFormatTag == WAVE_FORMAT_UNKNOWN)
455  return MMSYSERR_INVALPARAM;
456 
457  switch (fdwDetails) {
459  if (pafd->dwFormatTag != pafd->pwfx->wFormatTag) {
460  mmr = MMSYSERR_INVALPARAM;
461  break;
462  }
463  if (had == NULL) {
464  PWINE_ACMDRIVERID padid;
465 
466  mmr = ACMERR_NOTPOSSIBLE;
467  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
468  /* should check for codec only */
470  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
471  mmr = MSACM_Message(had, ACMDM_FORMAT_DETAILS, (LPARAM)pafd, fdwDetails);
472  acmDriverClose(had, 0);
473  if (mmr == MMSYSERR_NOERROR) break;
474  }
475  }
476  } else {
477  mmr = MSACM_Message(had, ACMDM_FORMAT_DETAILS, (LPARAM)pafd, fdwDetails);
478  }
479  break;
481  aftd.cbStruct = sizeof(aftd);
482  aftd.dwFormatTag = pafd->dwFormatTag;
484  if (mmr != MMSYSERR_NOERROR)
485  break;
486  if (pafd->dwFormatIndex >= aftd.cStandardFormats)
487  {
488  mmr = MMSYSERR_INVALPARAM;
489  break;
490  }
491  mmr = MSACM_Message(had, ACMDM_FORMAT_DETAILS, (LPARAM)pafd, fdwDetails);
492  break;
493  default:
494  WARN("Unknown fdwDetails %08x\n", fdwDetails);
495  mmr = MMSYSERR_INVALFLAG;
496  break;
497  }
498 
499  if (mmr == MMSYSERR_NOERROR && pafd->szFormat[0] == 0) {
500  wsprintfW(pafd->szFormat, fmt1, pafd->pwfx->nSamplesPerSec);
501  if (pafd->pwfx->wBitsPerSample) {
502  wsprintfW(pafd->szFormat + lstrlenW(pafd->szFormat), fmt2,
503  pafd->pwfx->wBitsPerSample);
504  }
505  MultiByteToWideChar(CP_ACP, 0, (pafd->pwfx->nChannels == 1) ? "; Mono" : "; Stereo", -1,
506  pafd->szFormat + lstrlenW(pafd->szFormat),
507  ARRAY_SIZE(pafd->szFormat) - lstrlenW(pafd->szFormat));
508  }
509 
510  TRACE("=> %d\n", mmr);
511  return mmr;
512 }
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:98
#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:415
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:179
#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:93
#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:852
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:491
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:872
WORD wFormatTag
Definition: mmreg.h:78
DWORD dwFormatIndex
Definition: msacm.h:504
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:48
#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 542 of file format.c.

545 {
546  ACMFORMATDETAILSW afdw;
547  struct MSACM_FormatEnumWtoA_Instance afei;
548 
549  if (!pafda)
550  return MMSYSERR_INVALPARAM;
551 
552  if (!fnCallback)
553  return MMSYSERR_INVALPARAM;
554 
555  if (pafda->cbStruct < sizeof(*pafda))
556  return MMSYSERR_INVALPARAM;
557 
558  memset(&afdw, 0, sizeof(afdw));
559  afdw.cbStruct = sizeof(afdw);
561  afdw.dwFormatTag = pafda->dwFormatTag;
562  afdw.fdwSupport = pafda->fdwSupport;
563  afdw.pwfx = pafda->pwfx;
564  afdw.cbwfx = pafda->cbwfx;
565 
566  afei.pafda = pafda;
567  afei.dwInstance = dwInstance;
568  afei.fnCallback = fnCallback;
569 
570  return acmFormatEnumW(had, &afdw, MSACM_FormatEnumCallbackWtoA,
571  (DWORD_PTR)&afei, fdwEnum);
572 }
PWAVEFORMATEX pwfx
Definition: msacm.h:507
DWORD cbStruct
Definition: msacm.h:492
ACMFORMATENUMCBA fnCallback
Definition: format.c:517
static BOOL CALLBACK MSACM_FormatEnumCallbackWtoA(HACMDRIVERID hadid, PACMFORMATDETAILSW pafdw, DWORD_PTR dwInstance, DWORD fdwSupport)
Definition: format.c:520
PWAVEFORMATEX pwfx
Definition: msacm.h:496
DWORD dwFormatIndex
Definition: msacm.h:493
PACMFORMATDETAILSA pafda
Definition: format.c:515
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:671
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 671 of file format.c.

674 {
675  PWINE_ACMDRIVERID padid;
676  WAVEFORMATEX wfxRef;
677  BOOL ret;
678  DWORD cbwfxMax;
679  MMRESULT mmr;
680 
681  TRACE("(%p, %p, %p, %ld, %d)\n",
682  had, pafd, fnCallback, dwInstance, fdwEnum);
683 
684  if (!pafd)
685  return MMSYSERR_INVALPARAM;
686 
687  if (!fnCallback)
688  return MMSYSERR_INVALPARAM;
689 
690  if (pafd->cbStruct < sizeof(*pafd))
691  return MMSYSERR_INVALPARAM;
692 
693  if (pafd->fdwSupport)
694  return MMSYSERR_INVALPARAM;
695 
696  if (!pafd->pwfx)
697  return MMSYSERR_INVALPARAM;
698 
702  wfxRef = *pafd->pwfx;
703 
704  if ((fdwEnum & ACM_FORMATENUMF_HARDWARE) &&
706  return MMSYSERR_INVALPARAM;
707 
708  if ((fdwEnum & ACM_FORMATENUMF_WFORMATTAG) &&
709  (pafd->dwFormatTag != pafd->pwfx->wFormatTag))
710  return MMSYSERR_INVALPARAM;
711 
713  FIXME("Unsupported fdwEnum values %08x\n", fdwEnum);
714 
715  mmr = acmMetrics((HACMOBJ)had, ACM_METRIC_MAX_SIZE_FORMAT, &cbwfxMax);
716  if (mmr != MMSYSERR_NOERROR)
717  return mmr;
718  if (pafd->cbwfx < cbwfxMax)
719  return MMSYSERR_INVALPARAM;
720 
721  if (had) {
722  HACMDRIVERID hadid;
723 
724  if (acmDriverID((HACMOBJ)had, &hadid, 0) != MMSYSERR_NOERROR)
725  return MMSYSERR_INVALHANDLE;
726  MSACM_FormatEnumHelper(MSACM_GetDriverID(hadid), had, pafd, &wfxRef,
727  fnCallback, dwInstance, fdwEnum);
728  return MMSYSERR_NOERROR;
729  }
730  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
731  /* should check for codec only */
733  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) != MMSYSERR_NOERROR)
734  continue;
735  ret = MSACM_FormatEnumHelper(padid, had, pafd, &wfxRef,
736  fnCallback, dwInstance, fdwEnum);
737  acmDriverClose(had, 0);
738  if (!ret) break;
739  }
740  return MMSYSERR_NOERROR;
741 }
PWAVEFORMATEX pwfx
Definition: msacm.h:507
DWORD fdwSupport
Definition: wineacm.h:98
#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:517
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:179
#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:93
#define ACM_FORMATENUMF_WFORMATTAG
Definition: msacm.h:164
MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID)
Definition: driver.c:352
#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:491
static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, PACMFORMATDETAILSW pafd, PWAVEFORMATEX pwfxRef, ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: format.c:577
WORD wFormatTag
Definition: mmreg.h:78
int ret
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:48
#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:836
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 746 of file format.c.

748 {
749  ACMFORMATTAGDETAILSW aftd = {0};
750  ACMDRVFORMATSUGGEST adfg;
751  MMRESULT mmr;
752 
753  TRACE("(%p, %p, %p, %d, %d)\n",
754  had, pwfxSrc, pwfxDst, cbwfxDst, fdwSuggest);
755 
756  if (!pwfxSrc || !pwfxDst)
757  return MMSYSERR_INVALPARAM;
758 
761  return MMSYSERR_INVALFLAG;
762 
763  /* if we were given PCM, try to convert to PCM */
764  if (pwfxSrc->wFormatTag == WAVE_FORMAT_PCM && !had &&
765  !(fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG))
766  {
767  ACMFORMATDETAILSW afd = {0};
768  afd.cbStruct = sizeof(afd);
770  afd.pwfx = pwfxSrc;
771  afd.cbwfx = sizeof(PCMWAVEFORMAT);
773  {
774  memcpy(pwfxDst, pwfxSrc, sizeof(PCMWAVEFORMAT));
775  return MMSYSERR_NOERROR;
776  }
777  }
778 
779  aftd.cbStruct = sizeof(aftd);
780  if (fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG)
781  aftd.dwFormatTag = pwfxDst->wFormatTag;
783  if ((fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG) && mmr == ACMERR_NOTPOSSIBLE)
784  return ACMERR_NOTPOSSIBLE;
785 
786  if (cbwfxDst < aftd.cbFormatSize)
787  return MMSYSERR_INVALPARAM;
788 
789  adfg.cbStruct = sizeof(adfg);
790  adfg.fdwSuggest = fdwSuggest;
791  adfg.pwfxSrc = pwfxSrc;
792  adfg.cbwfxSrc = (pwfxSrc->wFormatTag == WAVE_FORMAT_PCM) ?
793  sizeof(WAVEFORMATEX) : (sizeof(WAVEFORMATEX) + pwfxSrc->cbSize);
794  adfg.pwfxDst = pwfxDst;
795  adfg.cbwfxDst = cbwfxDst;
796 
797  if (had == NULL) {
798  PWINE_ACMDRIVERID padid;
799 
800  /* MS doc says: ACM finds the best suggestion.
801  * Well, first found will be the "best"
802  */
803  mmr = ACMERR_NOTPOSSIBLE;
804  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
805  /* should check for codec only */
807  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) != MMSYSERR_NOERROR)
808  continue;
809 
811  mmr = MMSYSERR_NOERROR;
812  break;
813  }
814  acmDriverClose(had, 0);
815  }
816  } else {
817  mmr = MSACM_Message(had, ACMDM_FORMAT_SUGGEST, (LPARAM)&adfg, 0L);
818  }
819  return mmr;
820 }
PWAVEFORMATEX pwfx
Definition: msacm.h:507
DWORD fdwSupport
Definition: wineacm.h:98
#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:179
#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:93
#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:852
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:491
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:872
WORD wFormatTag
Definition: mmreg.h:78
static const WCHAR L[]
Definition: oid.c:1250
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:48
#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:431
#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 825 of file format.c.

827 {
828  ACMFORMATTAGDETAILSW aftdw;
829  MMRESULT mmr;
830 
831  memset(&aftdw, 0, sizeof(aftdw));
832  aftdw.cbStruct = sizeof(aftdw);
833  aftdw.dwFormatTagIndex = paftda->dwFormatTagIndex;
834  aftdw.dwFormatTag = paftda->dwFormatTag;
835 
836  mmr = acmFormatTagDetailsW(had, &aftdw, fdwDetails);
837  if (mmr == MMSYSERR_NOERROR) {
838  paftda->dwFormatTag = aftdw.dwFormatTag;
839  paftda->dwFormatTagIndex = aftdw.dwFormatTagIndex;
840  paftda->cbFormatSize = aftdw.cbFormatSize;
841  paftda->fdwSupport = aftdw.fdwSupport;
842  paftda->cStandardFormats = aftdw.cStandardFormats;
843  WideCharToMultiByte( CP_ACP, 0, aftdw.szFormatTag, -1, paftda->szFormatTag,
844  sizeof(paftda->szFormatTag), NULL, NULL );
845  }
846  return mmr;
847 }
#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:852
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 852 of file format.c.

854 {
855  PWINE_ACMDRIVERID padid;
857 
858  TRACE("(%p, %p, %d)\n", had, paftd, fdwDetails);
859 
862  return MMSYSERR_INVALFLAG;
863 
864  switch (fdwDetails) {
866  if (had == NULL) {
867  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
868  /* should check for codec only */
870  MSACM_FindFormatTagInCache(padid, paftd->dwFormatTag, NULL) &&
871  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
872  mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
873  acmDriverClose(had, 0);
874  if (mmr == MMSYSERR_NOERROR) break;
875  }
876  }
877  } else {
878  PWINE_ACMDRIVER pad = MSACM_GetDriver(had);
879 
880  if (pad && MSACM_FindFormatTagInCache(pad->obj.pACMDriverID, paftd->dwFormatTag, NULL))
881  mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
882  }
883  break;
884 
886  if (had != NULL) {
887  PWINE_ACMDRIVER pad = MSACM_GetDriver(had);
888 
889  if (pad && paftd->dwFormatTagIndex < pad->obj.pACMDriverID->cFormatTags)
890  mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
891  }
892  break;
893 
895  if (had == NULL) {
897  DWORD ft = paftd->dwFormatTag;
898 
899  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
900  /* should check for codec only */
901  if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
902  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
903 
904  memset(&tmp, 0, sizeof(tmp));
905  tmp.cbStruct = sizeof(tmp);
906  tmp.dwFormatTag = ft;
907 
909  (LPARAM)&tmp, fdwDetails) == MMSYSERR_NOERROR) {
910  if (mmr == ACMERR_NOTPOSSIBLE ||
911  paftd->cbFormatSize < tmp.cbFormatSize) {
912  *paftd = tmp;
913  mmr = MMSYSERR_NOERROR;
914  }
915  }
916  acmDriverClose(had, 0);
917  }
918  }
919  } else {
920  mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
921  }
922  break;
923 
924  default:
925  WARN("Unsupported fdwDetails=%08x\n", fdwDetails);
926  mmr = MMSYSERR_ERROR;
927  }
928 
929  if (mmr == MMSYSERR_NOERROR &&
930  paftd->dwFormatTag == WAVE_FORMAT_PCM && paftd->szFormatTag[0] == 0)
931  MultiByteToWideChar(CP_ACP, 0, "PCM", -1, paftd->szFormatTag,
932  ARRAY_SIZE(paftd->szFormatTag));
933 
934  return mmr;
935 }
DWORD fdwSupport
Definition: wineacm.h:98
#define CP_ACP
Definition: compat.h:99
#define WARN(fmt,...)
Definition: debug.h:111
PWINE_ACMDRIVERID pACMDriverID
Definition: wineacm.h:45
DWORD cFormatTags
Definition: wineacm.h:97
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:118
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:179
#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:93
#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:491
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:872
PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver)
Definition: internal.c:844
WINE_ACMOBJ obj
Definition: wineacm.h:71
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:48
#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 967 of file format.c.

970 {
971  ACMFORMATTAGDETAILSW aftdw;
973 
974  if (!paftda)
975  return MMSYSERR_INVALPARAM;
976 
977  if (paftda->cbStruct < sizeof(*paftda))
978  return MMSYSERR_INVALPARAM;
979 
980  if (fdwEnum != 0)
981  return MMSYSERR_INVALFLAG;
982 
983  memset(&aftdw, 0, sizeof(aftdw));
984  aftdw.cbStruct = sizeof(aftdw);
986  aftdw.dwFormatTag = paftda->dwFormatTag;
987 
988  aftei.paftda = paftda;
989  aftei.dwInstance = dwInstance;
990  aftei.fnCallback = fnCallback;
991 
993  (DWORD_PTR)&aftei, fdwEnum);
994 }
PACMFORMATTAGDETAILSA paftda
Definition: format.c:938
static BOOL CALLBACK MSACM_FormatTagEnumCallbackWtoA(HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftdw, DWORD_PTR dwInstance, DWORD fdwSupport)
Definition: format.c:943
ACMFORMATTAGENUMCBA fnCallback
Definition: format.c:940
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:999
#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 999 of file format.c.

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