ReactOS 0.4.15-dev-5666-gc548b97
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");
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 */
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;
84 lParamW = (LPARAM)driverW;
85 }
86
87 resultW = acmDriverAddW(phadid, hinstModule, lParamW, dwPriority, fdwAdd);
89 return resultW;
90}
#define WARN(fmt,...)
Definition: debug.h:112
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define CP_ACP
Definition: compat.h:109
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define MultiByteToWideChar
Definition: compat.h:110
MMRESULT WINAPI acmDriverAddW(PHACMDRIVERID phadid, HINSTANCE hinstModule, LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
Definition: driver.c:96
HANDLE MSACM_hHeap
Definition: internal.c:47
GLenum GLsizei len
Definition: glext.h:6722
#define MMSYSERR_NOMEM
Definition: mmsystem.h:103
UINT MMRESULT
Definition: mmsystem.h:962
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
#define ACM_DRIVERADDF_FUNCTION
Definition: msacm.h:46
#define ACM_DRIVERADDF_GLOBAL
Definition: msacm.h:50
#define ACM_DRIVERADDF_NOTIFYHWND
Definition: msacm.h:47
#define ACM_DRIVERADDF_TYPEMASK
Definition: msacm.h:48
#define ACM_DRIVERADDF_NAME
Definition: msacm.h:45
static const WCHAR driverW[]
#define TRACE(s)
Definition: solgame.cpp:4
int32_t INT
Definition: typedefs.h:58
LONG_PTR LPARAM
Definition: windef.h:208
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180

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) {
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}
#define ERR(fmt,...)
Definition: debug.h:110
PWINE_ACMNOTIFYWND MSACM_RegisterNotificationWindow(HWND hNotifyWnd, DWORD dwNotifyMsg)
Definition: internal.c:416
PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry)
Definition: internal.c:61
void MSACM_BroadcastNotification(void)
Definition: internal.c:443
PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName, PWINE_ACMLOCALDRIVER pLocalDriver)
Definition: internal.c:285
PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc)
Definition: internal.c:883
LRESULT(CALLBACK * DRIVERPROC)(DWORD_PTR, HDRVR, UINT, LPARAM, LPARAM)
Definition: mmsystem.h:1001
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

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");
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}
PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver)
Definition: internal.c:844
LRESULT MSACM_CloseLocalDriver(PWINE_ACMLOCALDRIVERINST paldrv)
Definition: internal.c:1081
LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
Definition: driver.c:462
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
PWINE_ACMDRIVER pACMDriverList
Definition: wineacm.h:92
PWINE_ACMLOCALDRIVERINST pLocalDrvrInst
Definition: wineacm.h:73
HDRVR hDrvr
Definition: wineacm.h:72
WINE_ACMOBJ obj
Definition: wineacm.h:71
PWINE_ACMDRIVER pNextACMDriver
Definition: wineacm.h:75
PWINE_ACMDRIVERID pACMDriverID
Definition: wineacm.h:45
DWORD dwType
Definition: wineacm.h:44

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;
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;
256 sizeof(padda.szShortName), NULL, NULL );
257 WideCharToMultiByte( CP_ACP, 0, addw.szLongName, -1, padda.szLongName,
258 sizeof(padda.szLongName), NULL, NULL );
260 sizeof(padda.szCopyright), NULL, NULL );
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}
#define WideCharToMultiByte
Definition: compat.h:111
MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails)
Definition: driver.c:274
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define min(a, b)
Definition: monoChain.cc:55
FOURCC fccType
Definition: msacm.h:274
CHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]
Definition: msacm.h:293
DWORD cbStruct
Definition: msacm.h:272
CHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]
Definition: msacm.h:291
DWORD vdwDriver
Definition: msacm.h:281
CHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]
Definition: msacm.h:292
CHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]
Definition: msacm.h:289
DWORD cFilterTags
Definition: msacm.h:285
FOURCC fccComp
Definition: msacm.h:275
DWORD fdwSupport
Definition: msacm.h:283
CHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]
Definition: msacm.h:290
DWORD cFormatTags
Definition: msacm.h:284
DWORD cFilterTags
Definition: msacm.h:311
DWORD cbStruct
Definition: msacm.h:298
WCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]
Definition: msacm.h:317
WCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]
Definition: msacm.h:316
WCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]
Definition: msacm.h:315
FOURCC fccComp
Definition: msacm.h:301
WCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]
Definition: msacm.h:318
FOURCC fccType
Definition: msacm.h:300
WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]
Definition: msacm.h:319
DWORD cFormatTags
Definition: msacm.h:310
DWORD fdwSupport
Definition: msacm.h:309
DWORD vdwDriver
Definition: msacm.h:307

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)
308
309 return mmr;
310}
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:491
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:179
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:872
#define MMSYSERR_NOTSUPPORTED
Definition: mmsystem.h:104
#define MMSYSERR_NODRIVER
Definition: mmsystem.h:102
#define ACMDM_DRIVER_DETAILS
Definition: msacmdrv.h:46

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}
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:48
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ACM_DRIVERENUMF_DISABLED
Definition: msacm.h:70
#define ACM_DRIVERENUMF_NOLOCAL
Definition: msacm.h:69
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
DWORD fdwSupport
Definition: wineacm.h:98
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:93

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");
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}
PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type)
Definition: internal.c:823
#define WINE_ACMOBJ_DONTCARE
Definition: wineacm.h:35

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}
#define FIXME(fmt,...)
Definition: debug.h:111
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: driver.c:392
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:836
#define DRV_QUERYCONFIGURE
Definition: mmsystem.h:126
#define DRV_CONFIGURE
Definition: mmsystem.h:125
#define ACMDM_DRIVER_ABOUT
Definition: msacm.h:227
#define ACMDM_RESERVED_LOW
Definition: msacm.h:222
#define ACMDM_USER
Definition: msacm.h:221
LPWSTR pszDriverAlias
Definition: wineacm.h:89
LPCWSTR lpszDCIAliasName
Definition: mmsystem.h:991
LPCWSTR lpszDCISectionName
Definition: mmsystem.h:990
LONG_PTR LRESULT
Definition: windef.h:209
WCHAR * LPWSTR
Definition: xmlstorage.h:184

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;
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");
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
PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER paldrv, LPARAM lParam2)
Definition: internal.c:1026
HDRVR WINAPI OpenDriver(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lParam)
Definition: driver.c:400
#define debugstr_w
Definition: kernel32.h:32
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
DWORD WINAPI acmGetVersion(void)
Definition: msacm32_main.c:76
#define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED
Definition: msacm.h:59
#define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC
Definition: msacm.h:58
FOURCC fccType
Definition: msacmdrv.h:87
LPCWSTR pszAliasName
Definition: msacmdrv.h:93
LPCWSTR pszSectionName
Definition: msacmdrv.h:92
FOURCC fccComp
Definition: msacmdrv.h:88
DWORD dwVersion
Definition: msacmdrv.h:89
DWORD cbStruct
Definition: msacmdrv.h:86
DWORD dnDevNode
Definition: msacmdrv.h:94
PWINE_ACMLOCALDRIVER pLocalDriver
Definition: wineacm.h:91
uint32_t DWORD_PTR
Definition: typedefs.h:65
int ret
#define WINE_ACMOBJ_DRIVER
Definition: wineacm.h:37

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)) {
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");
675 }
676
677 if (padid) {
678 /* Check whether driver ID is appropriate for requested op */
679 if (dwPriority) {
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) {
709 padid->fdwSupport &= ~ACMDRIVERDETAILS_SUPPORTF_DISABLED;
710 bPerformBroadcast = TRUE;
711 }
712 }
713 }
714
715 if (panwnd) {
716 if (dwPriority) {
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) {
728 panwnd->fdwSupport &= ~ACMDRIVERDETAILS_SUPPORTF_DISABLED;
729 bPerformBroadcast = TRUE;
730 }
731 }
732 }
733
734 /* Perform broadcast of changes */
735 if (bPerformBroadcast) {
738 }
739 return MMSYSERR_NOERROR;
740 }
741}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
void MSACM_WriteCurrentPriorities(void)
Definition: internal.c:668
PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver)
Definition: internal.c:852
void MSACM_EnableNotifications(void)
Definition: internal.c:467
void MSACM_RePositionDriver(PWINE_ACMDRIVERID padid, DWORD dwPriority)
Definition: internal.c:504
void MSACM_DisableNotifications(void)
Definition: internal.c:459
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ACM_DRIVERPRIORITYF_END
Definition: msacm.h:76
#define ACM_DRIVERPRIORITYF_DISABLE
Definition: msacm.h:73
#define ACM_DRIVERPRIORITYF_ENABLE
Definition: msacm.h:72
#define ACMDRIVERDETAILS_SUPPORTF_LOCAL
Definition: msacm.h:66
#define ACM_DRIVERPRIORITYF_BEGIN
Definition: msacm.h:75
#define DWORD
Definition: nt_native.h:44
PWINE_ACMDRIVERID pPrevACMDriverID
Definition: wineacm.h:94

◆ 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");
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}
PWINE_ACMNOTIFYWND MSACM_UnRegisterNotificationWindow(const WINE_ACMNOTIFYWND *panwnd)
Definition: internal.c:481
PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
Definition: internal.c:773

◆ 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 ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define SetLastError(x)
Definition: compat.h:752

◆ 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}

◆ acmFilterDetailsA()

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

Definition at line 62 of file filter.c.

64{
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}
MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails)
Definition: filter.c:88
#define memset(x, y, z)
Definition: compat.h:39
DWORD dwFilterTag
Definition: msacm.h:386
PWAVEFILTER pwfltr
Definition: msacm.h:388
CHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS]
Definition: msacm.h:390
DWORD dwFilterIndex
Definition: msacm.h:385
DWORD fdwSupport
Definition: msacm.h:387
DWORD dwFilterIndex
Definition: msacm.h:396
WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS]
Definition: msacm.h:401
DWORD fdwSupport
Definition: msacm.h:398
DWORD dwFilterTag
Definition: msacm.h:397
PWAVEFILTER pwfltr
Definition: msacm.h:399
DWORD cbStruct
Definition: msacm.h:395

◆ 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) {
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}
#define ACM_FILTERDETAILSF_FILTER
Definition: msacm.h:96
#define ACM_FILTERDETAILSF_INDEX
Definition: msacm.h:95
#define ACMERR_NOTPOSSIBLE
Definition: msacm.h:36
#define ACMDM_FILTER_DETAILS
Definition: msacmdrv.h:56
DWORD dwFilterTag
Definition: mmreg.h:50

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{
173
174 memset(&afdw, 0, sizeof(afdw));
175 afdw.cbStruct = sizeof(afdw);
178 afdw.pwfltr = pafda->pwfltr;
179 afdw.cbwfltr = pafda->cbwfltr;
180
181 afei.pafda = pafda;
182 afei.dwInstance = dwInstance;
183 afei.fnCallback = fnCallback;
184
186 (DWORD_PTR)&afei, fdwEnum);
187}
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
ACMFILTERENUMCBA fnCallback
Definition: filter.c:142
PACMFILTERDETAILSA pafda
Definition: filter.c:140

◆ 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)
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}
MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID)
Definition: driver.c:352
static BOOL MSACM_FilterEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, PACMFILTERDETAILSW pafd, ACMFILTERENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: filter.c:189
#define ACM_FILTERENUMF_DWFILTERTAG
Definition: msacm.h:106

Referenced by acmFilterEnumA().

◆ acmFilterTagDetailsA()

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

Definition at line 264 of file filter.c.

266{
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}
MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails)
Definition: filter.c:291
WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]
Definition: msacm.h:427
DWORD cStandardFilters
Definition: msacm.h:426
DWORD dwFilterTagIndex
Definition: msacm.h:422

◆ 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}
#define WAVE_FORMAT_PCM
Definition: constants.h:425
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ACM_FILTERTAGDETAILSF_LARGESTSIZE
Definition: msacm.h:103
#define ACM_FILTERTAGDETAILSF_INDEX
Definition: msacm.h:101
#define ACM_FILTERTAGDETAILSF_FILTERTAG
Definition: msacm.h:102
#define ACMDM_FILTERTAG_DETAILS
Definition: msacmdrv.h:55

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{
406
407 memset(&aftdw, 0, sizeof(aftdw));
408 aftdw.cbStruct = sizeof(aftdw);
411
412 aftei.paftda = paftda;
413 aftei.dwInstance = dwInstance;
414 aftei.fnCallback = fnCallback;
415
417 (DWORD_PTR)&aftei, fdwEnum);
418}
MMRESULT WINAPI acmFilterTagEnumW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, ACMFILTERTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: filter.c:423
static BOOL CALLBACK MSACM_FilterTagEnumCallbackWtoA(HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftdw, DWORD_PTR dwInstance, DWORD fdwSupport)
Definition: filter.c:376
ACMFILTERTAGENUMCBA fnCallback
Definition: filter.c:373
PACMFILTERTAGDETAILSA paftda
Definition: filter.c:371
DWORD dwFilterTagIndex
Definition: msacm.h:411

◆ 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}
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

Referenced by acmFilterTagEnumA().

◆ acmFormatChooseA()

MMRESULT WINAPI acmFormatChooseA ( PACMFORMATCHOOSEA  pafmtc)

Definition at line 297 of file format.c.

298{
299 ACMFORMATCHOOSEW afcw;
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 }
368done:
371 HeapFree(GetProcessHeap(), 0, templ);
372 return ret;
373}
#define GetProcessHeap()
Definition: compat.h:736
MMRESULT WINAPI acmFormatChooseW(PACMFORMATCHOOSEW pafmtc)
Definition: format.c:378
static char title[]
Definition: ps.c:92
PWAVEFORMATEX pwfx
Definition: msacm.h:441
HINSTANCE hInstance
Definition: msacm.h:454
CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]
Definition: msacm.h:445
LPCSTR pszTitle
Definition: msacm.h:443
DWORD cchName
Definition: msacm.h:449
LPSTR pszName
Definition: msacm.h:448
LPCSTR pszTemplateName
Definition: msacm.h:455
PWAVEFORMATEX pwfxEnum
Definition: msacm.h:452
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]
Definition: msacm.h:446
DWORD fdwEnum
Definition: msacm.h:451
DWORD cbStruct
Definition: msacm.h:436
ACMFORMATCHOOSEHOOKPROCA pfnHook
Definition: msacm.h:457
DWORD fdwStyle
Definition: msacm.h:437
HWND hwndOwner
Definition: msacm.h:439
DWORD cchName
Definition: msacm.h:475
HWND hwndOwner
Definition: msacm.h:465
LPCWSTR pszTemplateName
Definition: msacm.h:481
DWORD fdwEnum
Definition: msacm.h:477
WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]
Definition: msacm.h:471
DWORD cbStruct
Definition: msacm.h:462
LPWAVEFORMATEX pwfxEnum
Definition: msacm.h:478
LPCWSTR pszTitle
Definition: msacm.h:469
WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]
Definition: msacm.h:472
LPWSTR pszName
Definition: msacm.h:474
DWORD fdwStyle
Definition: msacm.h:463
HINSTANCE hInstance
Definition: msacm.h:480
PWAVEFORMATEX pwfx
Definition: msacm.h:467
Definition: name.c:39

◆ 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}
static INT_PTR CALLBACK FormatChooseDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: format.c:218
HINSTANCE MSACM_hInstance32
Definition: msacm32_main.c:40
#define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE
Definition: msacm.h:153
#define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE
Definition: msacm.h:154
#define DLG_ACMFORMATCHOOSE_ID
Definition: msacmdlg.h:23
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)

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{
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}
MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails)
Definition: format.c:431
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]
Definition: msacm.h:498
DWORD dwFormatIndex
Definition: msacm.h:493
PWAVEFORMATEX pwfx
Definition: msacm.h:496
DWORD dwFormatTag
Definition: msacm.h:494
DWORD fdwSupport
Definition: msacm.h:495
WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]
Definition: msacm.h:509
DWORD dwFormatTag
Definition: msacm.h:505
DWORD dwFormatIndex
Definition: msacm.h:504
DWORD fdwSupport
Definition: msacm.h:506
PWAVEFORMATEX pwfx
Definition: msacm.h:507
DWORD cbStruct
Definition: msacm.h:503

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) {
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 {
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}
MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails)
Definition: format.c:852
#define WAVE_FORMAT_UNKNOWN
Definition: mmreg.h:95
#define ACM_FORMATTAGDETAILSF_FORMATTAG
Definition: msacm.h:183
#define ACM_FORMATDETAILSF_FORMAT
Definition: msacm.h:161
#define ACM_FORMATDETAILSF_INDEX
Definition: msacm.h:160
#define ACMDM_FORMAT_DETAILS
Definition: msacmdrv.h:52
DWORD cStandardFormats
Definition: msacm.h:534
DWORD nSamplesPerSec
Definition: mmreg.h:80
WORD nChannels
Definition: mmreg.h:79
WORD wFormatTag
Definition: mmreg.h:78
WORD wBitsPerSample
Definition: mmreg.h:83
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)

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{
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);
563 afdw.pwfx = pafda->pwfx;
564 afdw.cbwfx = pafda->cbwfx;
565
566 afei.pafda = pafda;
567 afei.dwInstance = dwInstance;
568 afei.fnCallback = fnCallback;
569
571 (DWORD_PTR)&afei, fdwEnum);
572}
MMRESULT WINAPI acmFormatEnumW(HACMDRIVER had, PACMFORMATDETAILSW pafd, ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: format.c:671
static BOOL CALLBACK MSACM_FormatEnumCallbackWtoA(HACMDRIVERID hadid, PACMFORMATDETAILSW pafdw, DWORD_PTR dwInstance, DWORD fdwSupport)
Definition: format.c:520
ACMFORMATENUMCBA fnCallback
Definition: format.c:517
PACMFORMATDETAILSA pafda
Definition: format.c:515
DWORD cbStruct
Definition: msacm.h:492

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)
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}
static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, PACMFORMATDETAILSW pafd, PWAVEFORMATEX pwfxRef, ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: format.c:577
MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
Definition: msacm32_main.c:106
#define ACM_FORMATENUMF_CONVERT
Definition: msacm.h:168
#define ACM_METRIC_MAX_SIZE_FORMAT
Definition: msacm.h:200
#define ACM_FORMATENUMF_SUGGEST
Definition: msacm.h:169
#define ACM_FORMATENUMF_NCHANNELS
Definition: msacm.h:165
#define ACM_FORMATENUMF_NSAMPLESPERSEC
Definition: msacm.h:166
#define ACM_FORMATENUMF_HARDWARE
Definition: msacm.h:170
#define ACM_FORMATENUMF_WFORMATTAG
Definition: msacm.h:164
#define ACM_FORMATENUMF_WBITSPERSAMPLE
Definition: msacm.h:167
#define ACM_FORMATENUMF_OUTPUT
Definition: msacm.h:172
#define ACM_FORMATENUMF_INPUT
Definition: msacm.h:171

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};
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}
struct pcmwaveformat_tag PCMWAVEFORMAT
#define ACM_FORMATSUGGESTF_WFORMATTAG
Definition: msacm.h:174
#define ACM_FORMATSUGGESTF_NCHANNELS
Definition: msacm.h:175
#define ACM_FORMATTAGDETAILSF_LARGESTSIZE
Definition: msacm.h:184
#define ACM_FORMATSUGGESTF_WBITSPERSAMPLE
Definition: msacm.h:177
#define ACM_FORMATSUGGESTF_NSAMPLESPERSEC
Definition: msacm.h:176
#define ACMDM_FORMAT_SUGGEST
Definition: msacmdrv.h:53
#define L(x)
Definition: ntvdm.h:50
PWAVEFORMATEX pwfxSrc
Definition: msacmdrv.h:151
PWAVEFORMATEX pwfxDst
Definition: msacmdrv.h:153
WORD cbSize
Definition: mmreg.h:84

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{
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}
WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]
Definition: msacm.h:535
DWORD dwFormatTagIndex
Definition: msacm.h:530

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 */
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 {
879
881 mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
882 }
883 break;
884
886 if (had != NULL) {
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}
BOOL MSACM_FindFormatTagInCache(const WINE_ACMDRIVERID *padid, DWORD fmtTag, LPDWORD idx)
Definition: internal.c:118
#define ACM_FORMATTAGDETAILSF_INDEX
Definition: msacm.h:182
#define ACMDM_FORMATTAG_DETAILS
Definition: msacmdrv.h:51
DWORD cFormatTags
Definition: wineacm.h:97

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{
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);
987
988 aftei.paftda = paftda;
989 aftei.dwInstance = dwInstance;
990 aftei.fnCallback = fnCallback;
991
993 (DWORD_PTR)&aftei, fdwEnum);
994}
MMRESULT WINAPI acmFormatTagEnumW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, ACMFORMATTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: format.c:999
static BOOL CALLBACK MSACM_FormatTagEnumCallbackWtoA(HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftdw, DWORD_PTR dwInstance, DWORD fdwSupport)
Definition: format.c:943
PACMFORMATTAGDETAILSA paftda
Definition: format.c:938
ACMFORMATTAGENUMCBA fnCallback
Definition: format.c:940
DWORD dwFormatTagIndex
Definition: msacm.h:519

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}

Referenced by acmFormatTagEnumA(), MSACM_FillFormat(), MSACM_FillFormatTags(), and MSACM_GetWFX().

◆ acmGetVersion()

DWORD WINAPI acmGetVersion ( void  )

Definition at line 76 of file msacm32_main.c.

77{
79
80 version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
81 if (!GetVersionExA( &version ))
82 return 0x04030000;
83
84 switch (version.dwPlatformId) {
86 return 0x04000565; /* 4.0.1381 */
88 return 0x02010000; /* 2.1 */
89 default:
90 FIXME("%x not supported\n", version.dwPlatformId);
91 /* fall through */
93 return 0x04030000; /* 4.3.0 */
94 }
95}
static const WCHAR version[]
Definition: asmname.c:66
BOOL WINAPI GetVersionExA(IN LPOSVERSIONINFOA lpVersionInformation)
Definition: version.c:69
#define VER_PLATFORM_WIN32_NT
Definition: rtltypes.h:238
#define VER_PLATFORM_WIN32_WINDOWS
Definition: rtltypes.h:237
#define VER_PLATFORM_WIN32s
Definition: rtltypes.h:236
struct _OSVERSIONINFOA OSVERSIONINFOA

Referenced by acmDriverOpen(), and driver_tests().

◆ acmMetrics()

MMRESULT WINAPI acmMetrics ( HACMOBJ  hao,
UINT  uMetric,
LPVOID  pMetric 
)

Definition at line 106 of file msacm32_main.c.

107{
109 BOOL bLocal = TRUE;
110 PWINE_ACMDRIVERID padid;
111 DWORD val = 0;
112 unsigned int i;
114
115 TRACE("(%p, %d, %p);\n", hao, uMetric, pMetric);
116
117#define CheckLocal(padid) (!bLocal || ((padid)->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_LOCAL))
118
119 switch (uMetric) {
121 bLocal = FALSE;
122 /* fall through */
124 if (hao) return MMSYSERR_INVALHANDLE;
125 if (!pMetric) return MMSYSERR_INVALPARAM;
126 for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID)
128 val++;
129 *(LPDWORD)pMetric = val;
130 break;
131
133 bLocal = FALSE;
134 /* fall through */
136 if (hao) return MMSYSERR_INVALHANDLE;
137 if (!pMetric) return MMSYSERR_INVALPARAM;
138 for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID)
141 CheckLocal(padid))
142 val++;
143 *(LPDWORD)pMetric = val;
144 break;
145
147 bLocal = FALSE;
148 /* fall through */
150 if (hao) return MMSYSERR_INVALHANDLE;
151 if (!pMetric) return MMSYSERR_INVALPARAM;
152 for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID)
155 CheckLocal(padid))
156 val++;
157 *(LPDWORD)pMetric = val;
158 break;
159
161 bLocal = FALSE;
162 /* fall through */
164 if (hao) return MMSYSERR_INVALHANDLE;
165 if (!pMetric) return MMSYSERR_INVALPARAM;
166 for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID)
169 CheckLocal(padid))
170 val++;
171 *(LPDWORD)pMetric = val;
172 break;
173
175 bLocal = FALSE;
176 /* fall through */
178 if (hao) return MMSYSERR_INVALHANDLE;
179 if (!pMetric) return MMSYSERR_INVALPARAM;
180 for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID)
182 val++;
183 *(LPDWORD)pMetric = val;
184 break;
185
187 if (hao == NULL) {
188 for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
190 for (i = 0; i < padid->cFormatTags; i++) {
191 if (val < padid->aFormatTag[i].cbwfx)
192 val = padid->aFormatTag[i].cbwfx;
193 }
194 }
195 }
196 } else if (pao != NULL) {
197 switch (pao->dwType) {
200 padid = pao->pACMDriverID;
201 break;
202 default:
204 }
206 for (i = 0; i < padid->cFormatTags; i++) {
207 if (val < padid->aFormatTag[i].cbwfx)
208 val = padid->aFormatTag[i].cbwfx;
209 }
210 }
211 } else {
213 }
214 if (!pMetric) return MMSYSERR_INVALPARAM;
215 *(LPDWORD)pMetric = val;
216 break;
217
219 if (hao) return MMSYSERR_INVALHANDLE;
220 if (!pMetric) return MMSYSERR_INVALPARAM;
221 *(LPDWORD)pMetric = 0;
222 FIXME("ACM_METRIC_COUNT_HARDWARE not implemented\n");
223 break;
224
226 /* Return current list position of driver */
227 if (!hao) return MMSYSERR_INVALHANDLE;
229 for (i = 1, padid = MSACM_pFirstACMDriverID; padid; i++, padid = padid->pNextACMDriverID) {
230 if (padid == (PWINE_ACMDRIVERID)hao) {
231 if (pMetric) {
232 *(LPDWORD)pMetric = i;
233 mmr = MMSYSERR_NOERROR;
234 } else {
236 }
237 break;
238 }
239 }
240 break;
241
243 /* Return fdwSupport for driver */
244 if (!hao) return MMSYSERR_INVALHANDLE;
246 for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
247 if (padid == (PWINE_ACMDRIVERID)hao) {
248 if (pMetric) {
249 *(LPDWORD)pMetric = padid->fdwSupport;
250 mmr = MMSYSERR_NOERROR;
251 } else {
253 }
254 break;
255 }
256 }
257 break;
258
262 default:
263 FIXME("(%p, %d, %p): stub\n", hao, uMetric, pMetric);
265 }
266 return mmr;
267}
GLuint GLfloat * val
Definition: glext.h:7180
#define CheckLocal(padid)
#define ACM_METRIC_HARDWARE_WAVE_INPUT
Definition: msacm.h:198
#define ACMDRIVERDETAILS_SUPPORTF_CONVERTER
Definition: msacm.h:62
#define ACM_METRIC_COUNT_DISABLED
Definition: msacm.h:191
#define ACM_METRIC_COUNT_FILTERS
Definition: msacm.h:190
#define ACM_METRIC_COUNT_LOCAL_CODECS
Definition: msacm.h:194
#define ACMDRIVERDETAILS_SUPPORTF_FILTER
Definition: msacm.h:63
#define ACM_METRIC_MAX_SIZE_FILTER
Definition: msacm.h:201
#define ACM_METRIC_COUNT_LOCAL_DISABLED
Definition: msacm.h:197
#define ACM_METRIC_HARDWARE_WAVE_OUTPUT
Definition: msacm.h:199
#define ACM_METRIC_COUNT_LOCAL_FILTERS
Definition: msacm.h:196
#define ACM_METRIC_COUNT_HARDWARE
Definition: msacm.h:192
#define ACM_METRIC_COUNT_CODECS
Definition: msacm.h:188
#define ACM_METRIC_DRIVER_PRIORITY
Definition: msacm.h:203
#define ACM_METRIC_COUNT_CONVERTERS
Definition: msacm.h:189
#define ACM_METRIC_COUNT_LOCAL_CONVERTERS
Definition: msacm.h:195
#define ACM_METRIC_COUNT_LOCAL_DRIVERS
Definition: msacm.h:193
#define ACM_METRIC_DRIVER_SUPPORT
Definition: msacm.h:202
#define ACMDRIVERDETAILS_SUPPORTF_CODEC
Definition: msacm.h:61
#define ACM_METRIC_COUNT_DRIVERS
Definition: msacm.h:187
#define LPDWORD
Definition: nt_native.h:46
struct _WINE_ACMDRIVERID::@471 * aFormatTag
#define WINE_ACMOBJ_DRIVERID
Definition: wineacm.h:36

Referenced by acmFormatEnumW(), AVISaveOptionsFmtChoose(), check_count(), DriverEnumProc(), FormatEnumProc(), FormatTagEnumProc(), test_acmFormatChoose(), and test_acmFormatSuggest().

◆ acmStreamClose()

MMRESULT WINAPI acmStreamClose ( HACMSTREAM  has,
DWORD  fdwClose 
)

Definition at line 65 of file stream.c.

66{
69
70 TRACE("(%p, %d)\n", has, fdwClose);
71
72 if ((was = ACM_GetStream(has)) == NULL) {
73 WARN("invalid handle\n");
75 }
76 ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_CLOSE, (LPARAM)&was->drvInst, 0);
77 if (ret == MMSYSERR_NOERROR) {
78 if (was->hAcmDriver)
80 HeapFree(MSACM_hHeap, 0, was);
81 }
82 TRACE("=> (%d)\n", ret);
83 return ret;
84}
static PWINE_ACMSTREAM ACM_GetStream(HACMSTREAM has)
Definition: stream.c:46
#define ACMDM_STREAM_CLOSE
Definition: msacmdrv.h:59
PWINE_ACMDRIVER pDrv
Definition: wineacm.h:81
ACMDRVSTREAMINSTANCE drvInst
Definition: wineacm.h:82
HACMDRIVER hAcmDriver
Definition: wineacm.h:83

Referenced by ACMStream_fnRelease(), ACMWrapper_BreakConnect(), AVIFILE_SaveFile(), audio_resampler_acm::close(), test_convert(), test_mp3(), test_prepareheader(), widClose(), widOpenHelper(), wodClose(), and wodOpenHelper().

◆ acmStreamConvert()

MMRESULT WINAPI acmStreamConvert ( HACMSTREAM  has,
PACMSTREAMHEADER  pash,
DWORD  fdwConvert 
)

Definition at line 89 of file stream.c.

91{
95
96 TRACE("(%p, %p, %d)\n", has, pash, fdwConvert);
97
98 if ((was = ACM_GetStream(has)) == NULL) {
99 WARN("invalid handle\n");
101 }
102 if (!pash || pash->cbStruct < sizeof(ACMSTREAMHEADER)) {
103 WARN("invalid parameter\n");
104 return MMSYSERR_INVALPARAM;
105 }
107 WARN("unprepared header\n");
108 return ACMERR_UNPREPARED;
109 }
110
111 pash->cbSrcLengthUsed = 0;
112 pash->cbDstLengthUsed = 0;
113
114 /* Note: the ACMSTREAMHEADER and ACMDRVSTREAMHEADER structs are of same
115 * size. some fields are private to msacm internals, and are exposed
116 * in ACMSTREAMHEADER in the dwReservedDriver array
117 */
118 padsh = (PACMDRVSTREAMHEADER)pash;
119
120 if (!ACM_ValidatePointers(padsh)) {
121 WARN("invalid parameter\n");
122 return MMSYSERR_INVALPARAM;
123 }
124
125 padsh->fdwConvert = fdwConvert;
126
127 ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_CONVERT, (LPARAM)&was->drvInst, (LPARAM)padsh);
128 if (ret == MMSYSERR_NOERROR) {
130 }
131 TRACE("=> (%d)\n", ret);
132 return ret;
133}
static BOOL ACM_ValidatePointers(PACMDRVSTREAMHEADER padsh)
Definition: stream.c:53
#define ACMSTREAMHEADER_STATUSF_PREPARED
Definition: msacm.h:210
#define ACMERR_UNPREPARED
Definition: msacm.h:38
#define ACMSTREAMHEADER_STATUSF_DONE
Definition: msacm.h:209
#define ACMDM_STREAM_CONVERT
Definition: msacmdrv.h:61
struct _ACMDRVSTREAMHEADER * PACMDRVSTREAMHEADER
Definition: msacmdrv.h:111
DWORD fdwStatus
Definition: msacm.h:551
DWORD cbSrcLengthUsed
Definition: msacm.h:555
DWORD cbStruct
Definition: msacm.h:550
DWORD cbDstLengthUsed
Definition: msacm.h:559

Referenced by ACMStream_fnRead(), ACMStream_fnWrite(), ACMWrapper_Receive(), audio_resampler_acm::audio_receive(), test_convert(), test_prepareheader(), widCallback(), and wodWrite().

◆ acmStreamMessage()

MMRESULT WINAPI acmStreamMessage ( HACMSTREAM  has,
UINT  uMsg,
LPARAM  lParam1,
LPARAM  lParam2 
)

Definition at line 138 of file stream.c.

140{
141 FIXME("(%p, %u, %ld, %ld): stub\n", has, uMsg, lParam1, lParam2);
143 return MMSYSERR_ERROR;
144}

◆ acmStreamOpen()

MMRESULT WINAPI acmStreamOpen ( PHACMSTREAM  phas,
HACMDRIVER  had,
PWAVEFORMATEX  pwfxSrc,
PWAVEFORMATEX  pwfxDst,
PWAVEFILTER  pwfltr,
DWORD_PTR  dwCallback,
DWORD_PTR  dwInstance,
DWORD  fdwOpen 
)

Definition at line 149 of file stream.c.

153{
154 PWINE_ACMSTREAM was;
155 PWINE_ACMDRIVER wad;
157 int wfxSrcSize;
158 int wfxDstSize;
159 WAVEFORMATEX wfxSrc, wfxDst;
160
161 TRACE("(%p, %p, %p, %p, %p, %ld, %ld, %d)\n",
162 phas, had, pwfxSrc, pwfxDst, pwfltr, dwCallback, dwInstance, fdwOpen);
163
164 /* NOTE: pwfxSrc and/or pwfxDst can point to a structure smaller than
165 * WAVEFORMATEX so don't use them directly when not sure */
166 if (pwfxSrc->wFormatTag == WAVE_FORMAT_PCM) {
167 memcpy(&wfxSrc, pwfxSrc, sizeof(PCMWAVEFORMAT));
168 wfxSrc.wBitsPerSample = pwfxSrc->wBitsPerSample;
169 wfxSrc.cbSize = 0;
170 pwfxSrc = &wfxSrc;
171 }
172
173 if (pwfxDst->wFormatTag == WAVE_FORMAT_PCM) {
174 memcpy(&wfxDst, pwfxDst, sizeof(PCMWAVEFORMAT));
175 wfxDst.wBitsPerSample = pwfxDst->wBitsPerSample;
176 wfxDst.cbSize = 0;
177 pwfxDst = &wfxDst;
178 }
179
180 TRACE("src [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%u, nAvgBytesPerSec=%u, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n",
181 pwfxSrc->wFormatTag, pwfxSrc->nChannels, pwfxSrc->nSamplesPerSec, pwfxSrc->nAvgBytesPerSec,
182 pwfxSrc->nBlockAlign, pwfxSrc->wBitsPerSample, pwfxSrc->cbSize);
183
184 TRACE("dst [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%u, nAvgBytesPerSec=%u, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n",
185 pwfxDst->wFormatTag, pwfxDst->nChannels, pwfxDst->nSamplesPerSec, pwfxDst->nAvgBytesPerSec,
186 pwfxDst->nBlockAlign, pwfxDst->wBitsPerSample, pwfxDst->cbSize);
187
188 /* (WS) In query mode, phas should be NULL. If it is not, then instead
189 * of returning an error we are making sure it is NULL, preventing some
190 * applications that pass garbage for phas from crashing.
191 */
192 if (fdwOpen & ACM_STREAMOPENF_QUERY) phas = NULL;
193
194 if (pwfltr && (pwfxSrc->wFormatTag != pwfxDst->wFormatTag)) {
195 WARN("invalid parameter\n");
196 return MMSYSERR_INVALPARAM;
197 }
198
199 wfxSrcSize = wfxDstSize = sizeof(WAVEFORMATEX);
200 if (pwfxSrc->wFormatTag != WAVE_FORMAT_PCM) wfxSrcSize += pwfxSrc->cbSize;
201 if (pwfxDst->wFormatTag != WAVE_FORMAT_PCM) wfxDstSize += pwfxDst->cbSize;
202
203 was = HeapAlloc(MSACM_hHeap, 0, sizeof(*was) + wfxSrcSize + wfxDstSize +
204 ((pwfltr) ? sizeof(WAVEFILTER) : 0));
205 if (was == NULL) {
206 WARN("no memory\n");
207 return MMSYSERR_NOMEM;
208 }
209
210 was->drvInst.cbStruct = sizeof(was->drvInst);
211 was->drvInst.pwfxSrc = (PWAVEFORMATEX)((LPSTR)was + sizeof(*was));
212 memcpy(was->drvInst.pwfxSrc, pwfxSrc, wfxSrcSize);
213 was->drvInst.pwfxDst = (PWAVEFORMATEX)((LPSTR)was + sizeof(*was) + wfxSrcSize);
214 memcpy(was->drvInst.pwfxDst, pwfxDst, wfxDstSize);
215 if (pwfltr) {
216 was->drvInst.pwfltr = (PWAVEFILTER)((LPSTR)was + sizeof(*was) + wfxSrcSize + wfxDstSize);
217 memcpy(was->drvInst.pwfltr, pwfltr, sizeof(WAVEFILTER));
218 } else {
219 was->drvInst.pwfltr = NULL;
220 }
221 was->drvInst.dwCallback = dwCallback;
222 was->drvInst.dwInstance = dwInstance;
223 was->drvInst.fdwOpen = fdwOpen;
224 was->drvInst.fdwDriver = 0L;
225 was->drvInst.dwDriver = 0L;
226 /* real value will be stored once ACMDM_STREAM_OPEN succeeds */
227 was->drvInst.has = 0L;
228
229 if (had) {
230 if (!(wad = MSACM_GetDriver(had))) {
232 goto errCleanUp;
233 }
234
236 was->obj.pACMDriverID = wad->obj.pACMDriverID;
237 was->pDrv = wad;
238 was->hAcmDriver = 0; /* not to close it in acmStreamClose */
239
240 ret = MSACM_Message((HACMDRIVER)wad, ACMDM_STREAM_OPEN, (LPARAM)&was->drvInst, 0L);
241 if (ret != MMSYSERR_NOERROR)
242 goto errCleanUp;
243 } else {
245
247 for (wadi = MSACM_pFirstACMDriverID; wadi; wadi = wadi->pNextACMDriverID) {
249 !MSACM_FindFormatTagInCache(wadi, pwfxSrc->wFormatTag, NULL) ||
251 continue;
252 ret = acmDriverOpen(&had, (HACMDRIVERID)wadi, 0L);
253 if (ret != MMSYSERR_NOERROR)
254 continue;
255 if ((wad = MSACM_GetDriver(had)) != 0) {
257 was->obj.pACMDriverID = wad->obj.pACMDriverID;
258 was->pDrv = wad;
259 was->hAcmDriver = had;
260
261 ret = MSACM_Message((HACMDRIVER)wad, ACMDM_STREAM_OPEN, (LPARAM)&was->drvInst, 0L);
262 TRACE("%s => %08x\n", debugstr_w(wadi->pszDriverAlias), ret);
263 if (ret == MMSYSERR_NOERROR) {
264 if (fdwOpen & ACM_STREAMOPENF_QUERY) {
265 MSACM_Message((HACMDRIVER)wad, ACMDM_STREAM_CLOSE, (LPARAM)&was->drvInst, 0);
266 acmDriverClose(had, 0L);
267 }
268 break;
269 }
270 }
271 /* no match, close this acm driver and try next one */
272 acmDriverClose(had, 0L);
273 }
274 if (ret != MMSYSERR_NOERROR) {
276 goto errCleanUp;
277 }
278 }
280 was->drvInst.has = (HACMSTREAM)was;
281 if (!(fdwOpen & ACM_STREAMOPENF_QUERY)) {
282 if (phas)
283 *phas = (HACMSTREAM)was;
284 TRACE("=> (%d)\n", ret);
285 return ret;
286 }
287errCleanUp:
288 if (phas)
289 *phas = NULL;
290 HeapFree(MSACM_hHeap, 0, was);
291 TRACE("=> (%d)\n", ret);
292 return ret;
293}
struct _WAVEFORMATEX * PWAVEFORMATEX
struct _WAVEFILTER * PWAVEFILTER
#define ACM_STREAMOPENF_QUERY
Definition: msacm.h:213
#define ACMDM_STREAM_OPEN
Definition: msacmdrv.h:58
WORD wBitsPerSample
Definition: audioclient.idl:45
PWAVEFORMATEX pwfxSrc
Definition: msacmdrv.h:100
DWORD_PTR dwCallback
Definition: msacmdrv.h:103
DWORD_PTR dwInstance
Definition: msacmdrv.h:104
PWAVEFILTER pwfltr
Definition: msacmdrv.h:102
PWAVEFORMATEX pwfxDst
Definition: msacmdrv.h:101
DWORD_PTR dwDriver
Definition: msacmdrv.h:107
WORD nBlockAlign
Definition: mmreg.h:82
DWORD nAvgBytesPerSec
Definition: mmreg.h:81
WINE_ACMOBJ obj
Definition: wineacm.h:88
WINE_ACMOBJ obj
Definition: wineacm.h:80
#define WINE_ACMOBJ_STREAM
Definition: wineacm.h:38

Referenced by ACMWrapper_CompleteConnect(), ACMWrapper_SetMediaType(), AVIFILE_OpenCompressor(), AVIFILE_SaveFile(), audio_resampler_acm::open(), test_convert(), test_mp3(), test_prepareheader(), widOpenHelper(), and wodOpenHelper().

◆ acmStreamPrepareHeader()

MMRESULT WINAPI acmStreamPrepareHeader ( HACMSTREAM  has,
PACMSTREAMHEADER  pash,
DWORD  fdwPrepare 
)

Definition at line 299 of file stream.c.

301{
302 PWINE_ACMSTREAM was;
305
306 TRACE("(%p, %p, %d)\n", has, pash, fdwPrepare);
307
308 if ((was = ACM_GetStream(has)) == NULL) {
309 WARN("invalid handle\n");
311 }
312 if (!pash || pash->cbStruct < sizeof(ACMSTREAMHEADER)) {
313 WARN("invalid parameter\n");
314 return MMSYSERR_INVALPARAM;
315 }
316 if (fdwPrepare) {
317 WARN("invalid use of reserved parameter\n");
318 return MMSYSERR_INVALFLAG;
319 }
322 pash->cbSrcLength < was->drvInst.pwfxSrc->nBlockAlign) {
323 WARN("source smaller than block align (%d < %d)\n",
326 }
327
328 /* Note: the ACMSTREAMHEADER and ACMDRVSTREAMHEADER structs are of same
329 * size. some fields are private to msacm internals, and are exposed
330 * in ACMSTREAMHEADER in the dwReservedDriver array
331 */
332 padsh = (PACMDRVSTREAMHEADER)pash;
333
334 padsh->fdwConvert = fdwPrepare;
335 padsh->padshNext = NULL;
336 padsh->fdwDriver = padsh->dwDriver = 0L;
337
338 padsh->fdwPrepared = 0;
339 padsh->dwPrepared = 0;
340 padsh->pbPreparedSrc = 0;
341 padsh->cbPreparedSrcLength = 0;
342 padsh->pbPreparedDst = 0;
343 padsh->cbPreparedDstLength = 0;
344
345 ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_PREPARE, (LPARAM)&was->drvInst, (LPARAM)padsh);
348 padsh->fdwStatus &= ~ACMSTREAMHEADER_STATUSF_INQUEUE;
350 padsh->fdwPrepared = padsh->fdwStatus;
351 padsh->dwPrepared = 0;
352 padsh->pbPreparedSrc = padsh->pbSrc;
353 padsh->cbPreparedSrcLength = padsh->cbSrcLength;
354 padsh->pbPreparedDst = padsh->pbDst;
355 padsh->cbPreparedDstLength = padsh->cbDstLength;
356 } else {
357 padsh->fdwPrepared = 0;
358 padsh->dwPrepared = 0;
359 padsh->pbPreparedSrc = 0;
360 padsh->cbPreparedSrcLength = 0;
361 padsh->pbPreparedDst = 0;
362 padsh->cbPreparedDstLength = 0;
363 }
364 TRACE("=> (%d)\n", ret);
365 return ret;
366}
#define WAVE_FORMAT_ADPCM
Definition: constants.h:426
#define ACMDM_STREAM_PREPARE
Definition: msacmdrv.h:63
LPBYTE pbPreparedDst
Definition: msacmdrv.h:135
PACMDRVSTREAMHEADER * padshNext
Definition: msacmdrv.h:126
LPBYTE pbPreparedSrc
Definition: msacmdrv.h:133
DWORD_PTR dwDriver
Definition: msacmdrv.h:128
DWORD cbPreparedDstLength
Definition: msacmdrv.h:136
DWORD cbPreparedSrcLength
Definition: msacmdrv.h:134
DWORD_PTR dwPrepared
Definition: msacmdrv.h:132
DWORD cbSrcLength
Definition: msacm.h:554

Referenced by ACMStream_fnRead(), ACMStream_fnWrite(), ACMWrapper_Receive(), audio_resampler_acm::open(), test_convert(), test_prepareheader(), widPrepare(), and wodPrepare().

◆ acmStreamReset()

MMRESULT WINAPI acmStreamReset ( HACMSTREAM  has,
DWORD  fdwReset 
)

Definition at line 371 of file stream.c.

372{
373 PWINE_ACMSTREAM was;
375
376 TRACE("(%p, %d)\n", has, fdwReset);
377
378 if (fdwReset) {
379 WARN("invalid flag\n");
381 } else if ((was = ACM_GetStream(has)) == NULL) {
382 WARN("invalid handle\n");
384 } else if (was->drvInst.fdwOpen & ACM_STREAMOPENF_ASYNC) {
385 ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_RESET, (LPARAM)&was->drvInst, 0);
386 }
387 TRACE("=> (%d)\n", ret);
388 return ret;
389}
#define ACM_STREAMOPENF_ASYNC
Definition: msacm.h:214
#define ACMDM_STREAM_RESET
Definition: msacmdrv.h:62

◆ acmStreamSize()

MMRESULT WINAPI acmStreamSize ( HACMSTREAM  has,
DWORD  cbInput,
LPDWORD  pdwOutputBytes,
DWORD  fdwSize 
)

Definition at line 394 of file stream.c.

396{
397 PWINE_ACMSTREAM was;
398 ACMDRVSTREAMSIZE adss;
400
401 TRACE("(%p, %d, %p, %d)\n", has, cbInput, pdwOutputBytes, fdwSize);
402
403 if ((was = ACM_GetStream(has)) == NULL) {
404 WARN("invalid handle\n");
406 }
407 if ((fdwSize & ~ACM_STREAMSIZEF_QUERYMASK) != 0) {
408 WARN("invalid flag\n");
409 return MMSYSERR_INVALFLAG;
410 }
411
412 *pdwOutputBytes = 0L;
413
414 switch (fdwSize & ACM_STREAMSIZEF_QUERYMASK) {
416 adss.cbDstLength = cbInput;
417 adss.cbSrcLength = 0;
418 break;
420 adss.cbSrcLength = cbInput;
421 adss.cbDstLength = 0;
422 break;
423 default:
424 WARN("invalid flag\n");
425 return MMSYSERR_INVALFLAG;
426 }
427
428 adss.cbStruct = sizeof(adss);
429 adss.fdwSize = fdwSize;
430 ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_SIZE,
431 (LPARAM)&was->drvInst, (LPARAM)&adss);
432 if (ret == MMSYSERR_NOERROR) {
433 switch (fdwSize & ACM_STREAMSIZEF_QUERYMASK) {
435 *pdwOutputBytes = adss.cbSrcLength;
436 break;
438 *pdwOutputBytes = adss.cbDstLength;
439 break;
440 }
441 }
442 TRACE("=> (%d) [%u]\n", ret, *pdwOutputBytes);
443 return ret;
444}
#define ACM_STREAMSIZEF_QUERYMASK
Definition: msacm.h:219
#define ACM_STREAMSIZEF_SOURCE
Definition: msacm.h:217
#define ACM_STREAMSIZEF_DESTINATION
Definition: msacm.h:218
#define ACMDM_STREAM_SIZE
Definition: msacmdrv.h:60

Referenced by AVIFILE_SaveFile(), audio_resampler_acm::open(), test_mp3(), widPrepare(), and wodPrepare().

◆ acmStreamUnprepareHeader()

MMRESULT WINAPI acmStreamUnprepareHeader ( HACMSTREAM  has,