Commit b8ba8459 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Implemented most of '*Format*' API.

Improved internal object and messages handling. Started some '*Filter*' functions. Fixed standard headers for Winelib. Fixed acmMetrics.
parent d2f8bf6f
...@@ -3,3 +3,4 @@ ...@@ -3,3 +3,4 @@
Makefile Makefile
libmsacm.so.1.0 libmsacm.so.1.0
libmsacm32.so.1.0 libmsacm32.so.1.0
msacm.s
...@@ -16,6 +16,9 @@ C_SRCS = \ ...@@ -16,6 +16,9 @@ C_SRCS = \
msacm_main.c \ msacm_main.c \
stream.c stream.c
RC_SRCS = \
msacm.rc
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
### Dependencies: ### Dependencies:
......
...@@ -142,8 +142,8 @@ MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, D ...@@ -142,8 +142,8 @@ MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, D
return MMSYSERR_INVALFLAG; return MMSYSERR_INVALFLAG;
mmr = acmDriverOpen(&acmDrvr, hadid, 0); mmr = acmDriverOpen(&acmDrvr, hadid, 0);
if (mmr == 0) { if (mmr == MMSYSERR_NOERROR) {
mmr = (MMRESULT)acmDriverMessage(acmDrvr, ACMDM_DRIVER_DETAILS, (LPARAM) padd, 0); mmr = (MMRESULT)MSACM_Message(acmDrvr, ACMDM_DRIVER_DETAILS, (LPARAM)padd, 0);
acmDriverClose(acmDrvr, 0); acmDriverClose(acmDrvr, 0);
} }
...@@ -157,25 +157,25 @@ MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, D ...@@ -157,25 +157,25 @@ MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, D
MMRESULT WINAPI acmDriverEnum(ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum) MMRESULT WINAPI acmDriverEnum(ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum)
{ {
PWINE_ACMDRIVERID p; PWINE_ACMDRIVERID p;
DWORD fdwSupport; ACMDRIVERDETAILSW add;
if (!fnCallback) { if (!fnCallback) return MMSYSERR_INVALPARAM;
return MMSYSERR_INVALPARAM;
}
if (fdwEnum && ~(ACM_DRIVERENUMF_NOLOCAL|ACM_DRIVERENUMF_DISABLED)) { if (fdwEnum && ~(ACM_DRIVERENUMF_NOLOCAL|ACM_DRIVERENUMF_DISABLED))
return MMSYSERR_INVALFLAG; return MMSYSERR_INVALFLAG;
}
add.cbStruct = sizeof(add);
for (p = MSACM_pFirstACMDriverID; p; p = p->pNextACMDriverID) { for (p = MSACM_pFirstACMDriverID; p; p = p->pNextACMDriverID) {
fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC; if (acmDriverDetailsW((HACMDRIVERID)p, &add, 0) != MMSYSERR_NOERROR)
continue;
if (!p->bEnabled) { if (!p->bEnabled) {
if (fdwEnum & ACM_DRIVERENUMF_DISABLED) if (fdwEnum & ACM_DRIVERENUMF_DISABLED)
fdwSupport |= ACMDRIVERDETAILS_SUPPORTF_DISABLED; add.fdwSupport |= ACMDRIVERDETAILS_SUPPORTF_DISABLED;
else else
continue; continue;
} }
(*fnCallback)((HACMDRIVERID) p, dwInstance, fdwSupport); if (!(*fnCallback)((HACMDRIVERID)p, dwInstance, add.fdwSupport))
break;
} }
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
...@@ -188,16 +188,16 @@ MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID ...@@ -188,16 +188,16 @@ MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID
{ {
PWINE_ACMOBJ pao; PWINE_ACMOBJ pao;
pao = MSACM_GetObj(hao);
if (!pao)
return MMSYSERR_INVALHANDLE;
if (!phadid) if (!phadid)
return MMSYSERR_INVALPARAM; return MMSYSERR_INVALPARAM;
if (fdwDriverID) if (fdwDriverID)
return MMSYSERR_INVALFLAG; return MMSYSERR_INVALFLAG;
pao = MSACM_GetObj(hao, WINE_ACMOBJ_DONTCARE);
if (!pao)
return MMSYSERR_INVALHANDLE;
*phadid = (HACMDRIVERID) pao->pACMDriverID; *phadid = (HACMDRIVERID) pao->pACMDriverID;
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
...@@ -205,21 +205,16 @@ MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID ...@@ -205,21 +205,16 @@ MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID
/*********************************************************************** /***********************************************************************
* acmDriverMessage (MSACM32.9) * acmDriverMessage (MSACM32.9)
* FIXME *
* Not implemented
*/ */
LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2) LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
{ {
PWINE_ACMDRIVER pad = MSACM_GetDriver(had); if ((uMsg >= ACMDM_USER && uMsg < ACMDM_RESERVED_LOW) ||
if (!pad) uMsg == ACMDM_DRIVER_ABOUT ||
return MMSYSERR_INVALPARAM; uMsg == DRV_QUERYCONFIGURE ||
uMsg == DRV_CONFIGURE)
/* FIXME: Check if uMsg legal */ return MSACM_Message(had, uMsg, lParam1, lParam2);
return MMSYSERR_INVALPARAM;
if (!SendDriverMessage(pad->hDrvr, uMsg, lParam1, lParam2))
return MMSYSERR_NOTSUPPORTED;
return MMSYSERR_NOERROR;
} }
...@@ -246,6 +241,7 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe ...@@ -246,6 +241,7 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe
pad = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVER)); pad = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVER));
if (!pad) return MMSYSERR_NOMEM; if (!pad) return MMSYSERR_NOMEM;
pad->obj.dwType = WINE_ACMOBJ_DRIVER;
pad->obj.pACMDriverID = padid; pad->obj.pACMDriverID = padid;
if (!padid->hInstModule) if (!padid->hInstModule)
......
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
/* /*
* MSACM32 library * MSACM32 library
* *
...@@ -9,148 +11,162 @@ ...@@ -9,148 +11,162 @@
#include "mmsystem.h" #include "mmsystem.h"
#include "msacm.h" #include "msacm.h"
#include "msacmdrv.h" #include "msacmdrv.h"
#include "wineacm.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(msacm) DEFAULT_DEBUG_CHANNEL(msacm);
/*********************************************************************** /***********************************************************************
* acmFilterChooseA (MSACM32.13) * acmFilterChooseA (MSACM32.13)
*/ */
MMRESULT WINAPI acmFilterChooseA( MMRESULT WINAPI acmFilterChooseA(PACMFILTERCHOOSEA pafltrc)
PACMFILTERCHOOSEA pafltrc)
{ {
FIXME("(%p): stub\n", pafltrc); FIXME("(%p): stub\n", pafltrc);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return MMSYSERR_ERROR; return MMSYSERR_ERROR;
} }
/*********************************************************************** /***********************************************************************
* acmFilterChooseW (MSACM32.14) * acmFilterChooseW (MSACM32.14)
*/ */
MMRESULT WINAPI acmFilterChooseW( MMRESULT WINAPI acmFilterChooseW(PACMFILTERCHOOSEW pafltrc)
PACMFILTERCHOOSEW pafltrc)
{ {
FIXME("(%p): stub\n", pafltrc); FIXME("(%p): stub\n", pafltrc);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return MMSYSERR_ERROR; return MMSYSERR_ERROR;
} }
/*********************************************************************** /***********************************************************************
* acmFilterDetailsA (MSACM32.15) * acmFilterDetailsA (MSACM32.15)
*/ */
MMRESULT WINAPI acmFilterDetailsA( MMRESULT WINAPI acmFilterDetailsA(HACMDRIVER had, PACMFILTERDETAILSA pafd,
HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails) DWORD fdwDetails)
{ {
if(fdwDetails & ~(ACM_FILTERDETAILSF_FILTER)) ACMFILTERDETAILSW afdw;
return MMSYSERR_INVALFLAG; MMRESULT mmr;
/* FIXME memset(&afdw, 0, sizeof(afdw));
* How does the driver know if the ANSI or afdw.cbStruct = sizeof(afdw);
* the UNICODE variant of PACMFILTERDETAILS is used? afdw.dwFilterIndex = pafd->dwFilterIndex;
* It might check cbStruct or does it only accept ANSI. afdw.dwFilterTag = pafd->dwFilterTag;
*/ afdw.pwfltr = pafd->pwfltr;
return (MMRESULT) acmDriverMessage( afdw.cbwfltr = pafd->cbwfltr;
had, ACMDM_FILTER_DETAILS,
(LPARAM) pafd, (LPARAM) fdwDetails mmr = acmFilterDetailsW(had, &afdw, fdwDetails);
); if (mmr == MMSYSERR_NOERROR) {
pafd->dwFilterTag = afdw.dwFilterTag;
pafd->fdwSupport = afdw.fdwSupport;
lstrcpyWtoA(pafd->szFilter, afdw.szFilter);
}
return mmr;
} }
/*********************************************************************** /***********************************************************************
* acmFilterDetailsW (MSACM32.16) * acmFilterDetailsW (MSACM32.16)
*/ */
MMRESULT WINAPI acmFilterDetailsW( MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd,
HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails) DWORD fdwDetails)
{ {
FIXME("(0x%08x, %p, %ld): stub\n", had, pafd, fdwDetails); TRACE("(0x%08x, %p, %ld)\n", had, pafd, fdwDetails);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return MMSYSERR_ERROR; if (fdwDetails & ~(ACM_FILTERDETAILSF_FILTER))
return MMSYSERR_INVALFLAG;
return MSACM_Message(had, ACMDM_FILTER_DETAILS,
(LPARAM) pafd, (LPARAM) fdwDetails);
} }
/*********************************************************************** /***********************************************************************
* acmFilterEnumA (MSACM32.17) * acmFilterEnumA (MSACM32.17)
*/ */
MMRESULT WINAPI acmFilterEnumA( MMRESULT WINAPI acmFilterEnumA(HACMDRIVER had, PACMFILTERDETAILSA pafd,
HACMDRIVER had, PACMFILTERDETAILSA pafd, ACMFILTERENUMCBA fnCallback, DWORD dwInstance,
ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum) DWORD fdwEnum)
{ {
FIXME("(0x%08x, %p, %p, %ld, %ld): stub\n", FIXME("(0x%08x, %p, %p, %ld, %ld): stub\n",
had, pafd, fnCallback, dwInstance, fdwEnum had, pafd, fnCallback, dwInstance, fdwEnum);
); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return MMSYSERR_ERROR;
return MMSYSERR_ERROR;
} }
/*********************************************************************** /***********************************************************************
* acmFilterEnumW (MSACM32.18) * acmFilterEnumW (MSACM32.18)
*/ */
MMRESULT WINAPI acmFilterEnumW( MMRESULT WINAPI acmFilterEnumW(HACMDRIVER had, PACMFILTERDETAILSW pafd,
HACMDRIVER had, PACMFILTERDETAILSW pafd, ACMFILTERENUMCBW fnCallback, DWORD dwInstance,
ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum) DWORD fdwEnum)
{ {
FIXME("(0x%08x, %p, %p, %ld, %ld): stub\n", FIXME("(0x%08x, %p, %p, %ld, %ld): stub\n",
had, pafd, fnCallback, dwInstance, fdwEnum had, pafd, fnCallback, dwInstance, fdwEnum);
); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return MMSYSERR_ERROR;
return MMSYSERR_ERROR;
} }
/*********************************************************************** /***********************************************************************
* acmFilterTagDetailsA (MSACM32.19) * acmFilterTagDetailsA (MSACM32.19)
*/ */
MMRESULT WINAPI acmFilterTagDetailsA( MMRESULT WINAPI acmFilterTagDetailsA(HACMDRIVER had, PACMFILTERTAGDETAILSA paftda,
HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, DWORD fdwDetails) DWORD fdwDetails)
{ {
if(fdwDetails & ACMFILTERTAGDETAILSW aftdw;
~(ACM_FILTERTAGDETAILSF_FILTERTAG| MMRESULT mmr;
ACM_FILTERTAGDETAILSF_LARGESTSIZE))
return MMSYSERR_INVALFLAG; memset(&aftdw, 0, sizeof(aftdw));
aftdw.cbStruct = sizeof(aftdw);
/* FIXME aftdw.dwFilterTagIndex = paftda->dwFilterTagIndex;
* How does the driver know if the ANSI or aftdw.dwFilterTag = paftda->dwFilterTag;
* the UNICODE variant of PACMFILTERTAGDETAILS is used?
* It might check cbStruct or does it only accept ANSI. mmr = acmFilterTagDetailsW(had, &aftdw, fdwDetails);
*/ if (mmr == MMSYSERR_NOERROR) {
return (MMRESULT) acmDriverMessage( paftda->dwFilterTag = aftdw.dwFilterTag;
had, ACMDM_FILTERTAG_DETAILS, paftda->dwFilterTagIndex = aftdw.dwFilterTagIndex;
(LPARAM) paftd, (LPARAM) fdwDetails paftda->cbFilterSize = aftdw.cbFilterSize;
); paftda->fdwSupport = aftdw.fdwSupport;
paftda->cStandardFilters = aftdw.cStandardFilters;
lstrcpyWtoA(paftda->szFilterTag, aftdw.szFilterTag);
}
return mmr;
} }
/*********************************************************************** /***********************************************************************
* acmFilterTagDetailsW (MSACM32.20) * acmFilterTagDetailsW (MSACM32.20)
*/ */
MMRESULT WINAPI acmFilterTagDetailsW( MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails) DWORD fdwDetails)
{ {
FIXME("(0x%08x, %p, %ld): stub\n", had, paftd, fdwDetails); TRACE("(0x%08x, %p, %ld)\n", had, paftd, fdwDetails);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return MMSYSERR_ERROR; if (fdwDetails &
~(ACM_FILTERTAGDETAILSF_FILTERTAG|
ACM_FILTERTAGDETAILSF_LARGESTSIZE))
return MMSYSERR_INVALFLAG;
return MSACM_Message(had, ACMDM_FILTERTAG_DETAILS,
(LPARAM)paftd, (LPARAM)fdwDetails);
} }
/*********************************************************************** /***********************************************************************
* acmFilterTagEnumA (MSACM32.21) * acmFilterTagEnumA (MSACM32.21)
*/ */
MMRESULT WINAPI acmFilterTagEnumA( MMRESULT WINAPI acmFilterTagEnumA(HACMDRIVER had, PACMFILTERTAGDETAILSA paftd,
HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance,
ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum) DWORD fdwEnum)
{ {
FIXME("(0x%08x, %p, %p, %ld, %ld): stub\n", FIXME("(0x%08x, %p, %p, %ld, %ld): stub\n",
had, paftd, fnCallback, dwInstance, fdwEnum had, paftd, fnCallback, dwInstance, fdwEnum);
); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return MMSYSERR_ERROR;
return MMSYSERR_ERROR;
} }
/*********************************************************************** /***********************************************************************
* acmFilterTagEnumW (MSACM32.22) * acmFilterTagEnumW (MSACM32.22)
*/ */
MMRESULT WINAPI acmFilterTagEnumW( MMRESULT WINAPI acmFilterTagEnumW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance,
ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum) DWORD fdwEnum)
{ {
FIXME("(0x%08x, %p, %p, %ld, %ld): stub\n", FIXME("(0x%08x, %p, %p, %ld, %ld): stub\n",
had, paftd, fnCallback, dwInstance, fdwEnum had, paftd, fnCallback, dwInstance, fdwEnum);
); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return MMSYSERR_ERROR;
return MMSYSERR_ERROR;
} }
...@@ -30,7 +30,7 @@ PWINE_ACMDRIVERID MSACM_pFirstACMDriverID = NULL; ...@@ -30,7 +30,7 @@ PWINE_ACMDRIVERID MSACM_pFirstACMDriverID = NULL;
PWINE_ACMDRIVERID MSACM_pLastACMDriverID = NULL; PWINE_ACMDRIVERID MSACM_pLastACMDriverID = NULL;
/*********************************************************************** /***********************************************************************
* MSACM_RegisterDriver32() * MSACM_RegisterDriver()
*/ */
PWINE_ACMDRIVERID MSACM_RegisterDriver(LPSTR pszDriverAlias, LPSTR pszFileName, PWINE_ACMDRIVERID MSACM_RegisterDriver(LPSTR pszDriverAlias, LPSTR pszFileName,
HINSTANCE hinstModule) HINSTANCE hinstModule)
...@@ -40,6 +40,8 @@ PWINE_ACMDRIVERID MSACM_RegisterDriver(LPSTR pszDriverAlias, LPSTR pszFileName, ...@@ -40,6 +40,8 @@ PWINE_ACMDRIVERID MSACM_RegisterDriver(LPSTR pszDriverAlias, LPSTR pszFileName,
TRACE("('%s', '%s', 0x%08x)\n", pszDriverAlias, pszFileName, hinstModule); TRACE("('%s', '%s', 0x%08x)\n", pszDriverAlias, pszFileName, hinstModule);
padid = (PWINE_ACMDRIVERID) HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVERID)); padid = (PWINE_ACMDRIVERID) HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVERID));
padid->obj.dwType = WINE_ACMOBJ_DRIVERID;
padid->obj.pACMDriverID = padid;
padid->pszDriverAlias = HEAP_strdupA(MSACM_hHeap, 0, pszDriverAlias); padid->pszDriverAlias = HEAP_strdupA(MSACM_hHeap, 0, pszDriverAlias);
padid->pszFileName = HEAP_strdupA(MSACM_hHeap, 0, pszFileName); padid->pszFileName = HEAP_strdupA(MSACM_hHeap, 0, pszFileName);
padid->hInstModule = hinstModule; padid->hInstModule = hinstModule;
...@@ -57,7 +59,7 @@ PWINE_ACMDRIVERID MSACM_RegisterDriver(LPSTR pszDriverAlias, LPSTR pszFileName, ...@@ -57,7 +59,7 @@ PWINE_ACMDRIVERID MSACM_RegisterDriver(LPSTR pszDriverAlias, LPSTR pszFileName,
} }
/*********************************************************************** /***********************************************************************
* MSACM_RegisterAllDrivers32() * MSACM_RegisterAllDrivers()
*/ */
void MSACM_RegisterAllDrivers(void) void MSACM_RegisterAllDrivers(void)
{ {
...@@ -95,7 +97,7 @@ void MSACM_RegisterAllDrivers(void) ...@@ -95,7 +97,7 @@ void MSACM_RegisterAllDrivers(void)
} }
/*********************************************************************** /***********************************************************************
* MSACM_UnregisterDriver32() * MSACM_UnregisterDriver()
*/ */
PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p) PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
{ {
...@@ -127,7 +129,7 @@ PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p) ...@@ -127,7 +129,7 @@ PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
} }
/*********************************************************************** /***********************************************************************
* MSACM_UnregisterAllDrivers32() * MSACM_UnregisterAllDrivers()
* FIXME * FIXME
* Where should this function be called? * Where should this function be called?
*/ */
...@@ -139,27 +141,40 @@ void MSACM_UnregisterAllDrivers(void) ...@@ -139,27 +141,40 @@ void MSACM_UnregisterAllDrivers(void)
} }
/*********************************************************************** /***********************************************************************
* MSACM_GetDriverID32() * MSACM_GetObj()
*/ */
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID) PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type)
{ {
return (PWINE_ACMDRIVERID)hDriverID; PWINE_ACMOBJ pao = (PWINE_ACMOBJ)hObj;
if (IsBadReadPtr(pao, sizeof(WINE_ACMOBJ)) ||
((type != WINE_ACMOBJ_DONTCARE) && (type != pao->dwType)))
return NULL;
return pao;
} }
/*********************************************************************** /***********************************************************************
* MSACM_GetDriver32() * MSACM_GetDriverID()
*/ */
PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver) PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
{ {
return (PWINE_ACMDRIVER)hDriver; return (PWINE_ACMDRIVERID)MSACM_GetObj((HACMOBJ)hDriverID, WINE_ACMOBJ_DRIVERID);
} }
/*********************************************************************** /***********************************************************************
* MSACM_GetObj32() * MSACM_GetDriver()
*/ */
PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj) PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver)
{ {
return (PWINE_ACMOBJ)hObj; return (PWINE_ACMDRIVER)MSACM_GetObj((HACMOBJ)hDriver, WINE_ACMOBJ_DRIVER);
} }
/***********************************************************************
* MSACM_Message()
*/
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
{
PWINE_ACMDRIVER pad = MSACM_GetDriver(had);
return pad ? SendDriverMessage(pad->hDrvr, uMsg, lParam1, lParam2) : MMSYSERR_INVALHANDLE;
}
/*
* Top level resource file for MS ACM
*
*/
#include "windef.h"
#include "winuser.h"
#include "wineacm.h"
LANGUAGE 0,0
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Sound Selection"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Name:", -1, 5, 5, 115, 8, NOT WS_GROUP
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 115, 60,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Save As...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Remove", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "&Format:", -1, 5, 41, 44, 8, NOT WS_GROUP
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 50, 39, 170, 60,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&Attributes:", -1, 5, 59, 44, 8, NOT WS_GROUP
#if 0
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP |
CBS_OWNERDRAWFIXED | CBS_HASSTRINGS
#else
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
#endif
DEFPUSHBUTTON "OK", IDOK, 48, 80, 40, 14
PUSHBUTTON "Cancel", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "&Help", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END
name msacm32 name msacm32
type win32 type win32
init MSACM32_LibMain init MSACM32_LibMain
rsrc msacm
import winmm.dll import winmm.dll
import kernel32.dll import kernel32.dll
......
...@@ -20,6 +20,7 @@ DEFAULT_DEBUG_CHANNEL(msacm); ...@@ -20,6 +20,7 @@ DEFAULT_DEBUG_CHANNEL(msacm);
/**********************************************************************/ /**********************************************************************/
static DWORD MSACM_dwProcessesAttached = 0; static DWORD MSACM_dwProcessesAttached = 0;
HINSTANCE MSACM_hInstance32 = 0;
/*********************************************************************** /***********************************************************************
* MSACM_LibMain (MSACM32.init) * MSACM_LibMain (MSACM32.init)
...@@ -32,6 +33,7 @@ BOOL WINAPI MSACM32_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReser ...@@ -32,6 +33,7 @@ BOOL WINAPI MSACM32_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReser
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
if (MSACM_dwProcessesAttached == 0) { if (MSACM_dwProcessesAttached == 0) {
MSACM_hHeap = HeapCreate(0, 0x10000, 0); MSACM_hHeap = HeapCreate(0, 0x10000, 0);
MSACM_hInstance32 = hInstDLL;
MSACM_RegisterAllDrivers(); MSACM_RegisterAllDrivers();
} }
MSACM_dwProcessesAttached++; MSACM_dwProcessesAttached++;
...@@ -42,6 +44,7 @@ BOOL WINAPI MSACM32_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReser ...@@ -42,6 +44,7 @@ BOOL WINAPI MSACM32_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReser
MSACM_UnregisterAllDrivers(); MSACM_UnregisterAllDrivers();
HeapDestroy(MSACM_hHeap); HeapDestroy(MSACM_hHeap);
MSACM_hHeap = (HANDLE) NULL; MSACM_hHeap = (HANDLE) NULL;
MSACM_hInstance32 = (HINSTANCE)NULL;
} }
break; break;
case DLL_THREAD_ATTACH: case DLL_THREAD_ATTACH:
...@@ -87,14 +90,15 @@ DWORD WINAPI acmGetVersion(void) ...@@ -87,14 +90,15 @@ DWORD WINAPI acmGetVersion(void)
/*********************************************************************** /***********************************************************************
* acmMetrics (MSACM32.36) * acmMetrics (MSACM32.36)
*/ */
MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric) MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
{ {
PWINE_ACMOBJ pao = MSACM_GetObj(hao); PWINE_ACMOBJ pao = MSACM_GetObj(hao, WINE_ACMOBJ_DONTCARE);
BOOL bLocal = TRUE; BOOL bLocal = TRUE;
PWINE_ACMDRIVERID padid; PWINE_ACMDRIVERID padid;
DWORD val = 0; DWORD val = 0;
MMRESULT mmr = MMSYSERR_NOERROR;
FIXME("(0x%08x, %d, %p): stub\n", hao, uMetric, pMetric); TRACE("(0x%08x, %d, %p);\n", hao, uMetric, pMetric);
switch (uMetric) { switch (uMetric) {
case ACM_METRIC_COUNT_DRIVERS: case ACM_METRIC_COUNT_DRIVERS:
...@@ -107,7 +111,7 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric) ...@@ -107,7 +111,7 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
if (padid->bEnabled /* && (local(padid) || !bLocal) */) if (padid->bEnabled /* && (local(padid) || !bLocal) */)
val++; val++;
*(LPDWORD)pMetric = val; *(LPDWORD)pMetric = val;
return 0; break;
case ACM_METRIC_COUNT_CODECS: case ACM_METRIC_COUNT_CODECS:
if (!pao) if (!pao)
...@@ -120,7 +124,7 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric) ...@@ -120,7 +124,7 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
if (padid->bEnabled /* && (local(padid) || !bLocal) */) if (padid->bEnabled /* && (local(padid) || !bLocal) */)
val++; val++;
*(LPDWORD)pMetric = val; *(LPDWORD)pMetric = val;
return 0; break;
case ACM_METRIC_COUNT_CONVERTERS: case ACM_METRIC_COUNT_CONVERTERS:
bLocal = FALSE; bLocal = FALSE;
...@@ -131,7 +135,7 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric) ...@@ -131,7 +135,7 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
if (padid->bEnabled /* && (local(padid) || !bLocal) */) if (padid->bEnabled /* && (local(padid) || !bLocal) */)
val++; val++;
*(LPDWORD)pMetric = val; *(LPDWORD)pMetric = val;
return 0; break;
case ACM_METRIC_COUNT_FILTERS: case ACM_METRIC_COUNT_FILTERS:
bLocal = FALSE; bLocal = FALSE;
...@@ -142,7 +146,7 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric) ...@@ -142,7 +146,7 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
if (padid->bEnabled /* && (local(padid) || !bLocal) */) if (padid->bEnabled /* && (local(padid) || !bLocal) */)
val++; val++;
*(LPDWORD)pMetric = val; *(LPDWORD)pMetric = val;
return 0; break;
case ACM_METRIC_COUNT_DISABLED: case ACM_METRIC_COUNT_DISABLED:
bLocal = FALSE; bLocal = FALSE;
...@@ -154,14 +158,33 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric) ...@@ -154,14 +158,33 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
if (!padid->bEnabled /* && (local(padid) || !bLocal) */) if (!padid->bEnabled /* && (local(padid) || !bLocal) */)
val++; val++;
*(LPDWORD)pMetric = val; *(LPDWORD)pMetric = val;
return 0; break;
case ACM_METRIC_MAX_SIZE_FORMAT: case ACM_METRIC_MAX_SIZE_FORMAT:
/* FIXME: According to MSDN, this should return the size of the largest WAVEFORMATEX {
structure in the system. How is this calculated? */ ACMFORMATTAGDETAILSW aftd;
*(LPDWORD)pMetric = sizeof (WAVEFORMATEX);
return 0; aftd.cbStruct = sizeof(aftd);
aftd.dwFormatTag = WAVE_FORMAT_UNKNOWN;
if (hao == (HACMOBJ)NULL) {
mmr = acmFormatTagDetailsW((HACMDRIVER)NULL, &aftd, ACM_FORMATTAGDETAILSF_LARGESTSIZE);
} else if (MSACM_GetObj(hao, WINE_ACMOBJ_DRIVER)) {
mmr = acmFormatTagDetailsW((HACMDRIVER)hao, &aftd, ACM_FORMATTAGDETAILSF_LARGESTSIZE);
} else if (MSACM_GetObj(hao, WINE_ACMOBJ_DRIVERID)) {
HACMDRIVER had;
if (acmDriverOpen(&had, (HACMDRIVERID)hao, 0) == 0) {
mmr = acmFormatTagDetailsW((HACMDRIVER)hao, &aftd, ACM_FORMATTAGDETAILSF_LARGESTSIZE);
acmDriverClose(had, 0);
}
} else {
mmr = MMSYSERR_INVALHANDLE;
}
if (mmr == MMSYSERR_NOERROR) *(LPDWORD)pMetric = aftd.cbFormatSize;
}
break;
case ACM_METRIC_COUNT_HARDWARE: case ACM_METRIC_COUNT_HARDWARE:
case ACM_METRIC_HARDWARE_WAVE_INPUT: case ACM_METRIC_HARDWARE_WAVE_INPUT:
case ACM_METRIC_HARDWARE_WAVE_OUTPUT: case ACM_METRIC_HARDWARE_WAVE_OUTPUT:
...@@ -169,7 +192,8 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric) ...@@ -169,7 +192,8 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
case ACM_METRIC_DRIVER_SUPPORT: case ACM_METRIC_DRIVER_SUPPORT:
case ACM_METRIC_DRIVER_PRIORITY: case ACM_METRIC_DRIVER_PRIORITY:
default: default:
return MMSYSERR_NOTSUPPORTED; FIXME("(0x%08x, %d, %p): stub\n", hao, uMetric, pMetric);
mmr = MMSYSERR_NOTSUPPORTED;
} }
return MMSYSERR_NOERROR; return mmr;
} }
...@@ -165,6 +165,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw ...@@ -165,6 +165,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw
goto errCleanUp; goto errCleanUp;
} }
was->obj.dwType = WINE_ACMOBJ_STREAM;
was->obj.pACMDriverID = wad->obj.pACMDriverID; was->obj.pACMDriverID = wad->obj.pACMDriverID;
was->pDrv = wad; was->pDrv = wad;
was->hAcmDriver = 0; /* not to close it in acmStreamClose */ was->hAcmDriver = 0; /* not to close it in acmStreamClose */
...@@ -180,6 +181,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw ...@@ -180,6 +181,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw
ret = acmDriverOpen(&had, (HACMDRIVERID)wadi, 0L); ret = acmDriverOpen(&had, (HACMDRIVERID)wadi, 0L);
if (ret == MMSYSERR_NOERROR) { if (ret == MMSYSERR_NOERROR) {
if ((wad = MSACM_GetDriver(had)) != 0) { if ((wad = MSACM_GetDriver(had)) != 0) {
was->obj.dwType = WINE_ACMOBJ_STREAM;
was->obj.pACMDriverID = wad->obj.pACMDriverID; was->obj.pACMDriverID = wad->obj.pACMDriverID;
was->pDrv = wad; was->pDrv = wad;
was->hAcmDriver = had; was->hAcmDriver = had;
......
...@@ -6,9 +6,15 @@ ...@@ -6,9 +6,15 @@
typedef struct _WINE_ACMDRIVERID *PWINE_ACMDRIVERID; typedef struct _WINE_ACMDRIVERID *PWINE_ACMDRIVERID;
typedef struct _WINE_ACMDRIVER *PWINE_ACMDRIVER; typedef struct _WINE_ACMDRIVER *PWINE_ACMDRIVER;
#define WINE_ACMOBJ_DONTCARE 0x5EED0000
#define WINE_ACMOBJ_DRIVERID 0x5EED0001
#define WINE_ACMOBJ_DRIVER 0x5EED0002
#define WINE_ACMOBJ_STREAM 0x5EED0003
typedef struct _WINE_ACMOBJ typedef struct _WINE_ACMOBJ
{ {
PWINE_ACMDRIVERID pACMDriverID; DWORD dwType;
PWINE_ACMDRIVERID pACMDriverID;
} WINE_ACMOBJ, *PWINE_ACMOBJ; } WINE_ACMOBJ, *PWINE_ACMOBJ;
typedef struct _WINE_ACMDRIVER typedef struct _WINE_ACMDRIVER
...@@ -29,6 +35,7 @@ typedef struct _WINE_ACMSTREAM ...@@ -29,6 +35,7 @@ typedef struct _WINE_ACMSTREAM
typedef struct _WINE_ACMDRIVERID typedef struct _WINE_ACMDRIVERID
{ {
WINE_ACMOBJ obj;
LPSTR pszDriverAlias; LPSTR pszDriverAlias;
LPSTR pszFileName; LPSTR pszFileName;
HINSTANCE hInstModule; /* NULL if global */ HINSTANCE hInstModule; /* NULL if global */
...@@ -43,13 +50,33 @@ typedef struct _WINE_ACMDRIVERID ...@@ -43,13 +50,33 @@ typedef struct _WINE_ACMDRIVERID
extern HANDLE MSACM_hHeap; extern HANDLE MSACM_hHeap;
extern PWINE_ACMDRIVERID MSACM_pFirstACMDriverID; extern PWINE_ACMDRIVERID MSACM_pFirstACMDriverID;
extern PWINE_ACMDRIVERID MSACM_pLastACMDriverID; extern PWINE_ACMDRIVERID MSACM_pLastACMDriverID;
PWINE_ACMDRIVERID MSACM_RegisterDriver( extern PWINE_ACMDRIVERID MSACM_RegisterDriver(LPSTR pszDriverAlias, LPSTR pszFileName,
LPSTR pszDriverAlias, LPSTR pszFileName, HINSTANCE hinstModule);
HINSTANCE hinstModule); extern void MSACM_RegisterAllDrivers(void);
void MSACM_RegisterAllDrivers(void); extern PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p);
PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p); extern void MSACM_UnregisterAllDrivers(void);
void MSACM_UnregisterAllDrivers(void); extern PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID);
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID); extern PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver);
PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver); extern PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type);
PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj);
extern MMRESULT MSACM_Message(HACMDRIVER, UINT, LPARAM, LPARAM);
/* From msacm32.c */
extern HINSTANCE MSACM_hInstance32;
/* Dialog box templates */
#define DLG_ACMFORMATCHOOSE_ID 70
#define IDD_ACMFORMATCHOOSE_BTN_HELP 9
#define IDD_ACMFORMATCHOOSE_CMB_CUSTOM 100
#define IDD_ACMFORMATCHOOSE_CMB_FORMATTAG 101
#define IDD_ACMFORMATCHOOSE_CMB_FORMAT 102
#define IDD_ACMFORMATCHOOSE_BTN_SETNAME 103
#define IDD_ACMFORMATCHOOSE_BTN_DELNAME 104
#define DLG_ACMFILTERCHOOSE_ID 71
#define IDD_ACMFILTERCHOOSE_BTN_HELP 9
#define IDD_ACMFILTERCHOOSE_CMB_CUSTOM 100
#define IDD_ACMFILTERCHOOSE_CMB_FILTERTAG 101
#define IDD_ACMFILTERCHOOSE_CMB_FILTER 102
#define IDD_ACMFILTERCHOOSE_BTN_SETNAME 103
#define IDD_ACMFILTERCHOOSE_BTN_DELNAME 104
...@@ -205,6 +205,7 @@ typedef UINT CALLBACK (*ACMFILTERCHOOSEHOOKPROCA)( ...@@ -205,6 +205,7 @@ typedef UINT CALLBACK (*ACMFILTERCHOOSEHOOKPROCA)(
typedef UINT CALLBACK (*ACMFILTERCHOOSEHOOKPROCW)( typedef UINT CALLBACK (*ACMFILTERCHOOSEHOOKPROCW)(
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
); );
#define ACMFILTERCHOOSEHOOKPROC WINELIB_NAME_AW(ACMFILTERCHOOSEHOOKPROC)
typedef UINT CALLBACK (*ACMFILTERCHOOSEHOOKPROC16)( typedef UINT CALLBACK (*ACMFILTERCHOOSEHOOKPROC16)(
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
...@@ -217,6 +218,7 @@ typedef UINT CALLBACK (*ACMFORMATCHOOSEHOOKPROCA)( ...@@ -217,6 +218,7 @@ typedef UINT CALLBACK (*ACMFORMATCHOOSEHOOKPROCA)(
typedef UINT CALLBACK (*ACMFORMATCHOOSEHOOKPROCW)( typedef UINT CALLBACK (*ACMFORMATCHOOSEHOOKPROCW)(
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
); );
#define ACMFORMATCHOOSEHOOKPROC WINELIB_NAME_AW(ACMFORMATCHOOSEHOOKPROC)
typedef UINT16 CALLBACK (*ACMFORMATCHOOSEHOOKPROC16)( typedef UINT16 CALLBACK (*ACMFORMATCHOOSEHOOKPROC16)(
HWND16 hwnd, UINT16 uMsg, WPARAM16 wParam, LPARAM lParam HWND16 hwnd, UINT16 uMsg, WPARAM16 wParam, LPARAM lParam
...@@ -278,6 +280,9 @@ typedef struct _ACMDRIVERDETAILSW ...@@ -278,6 +280,9 @@ typedef struct _ACMDRIVERDETAILSW
WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]; WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
} ACMDRIVERDETAILSW, *PACMDRIVERDETAILSW; } ACMDRIVERDETAILSW, *PACMDRIVERDETAILSW;
DECL_WINELIB_TYPE_AW(ACMDRIVERDETAILS);
DECL_WINELIB_TYPE_AW(PACMDRIVERDETAILS);
typedef struct _ACMDRIVERDETAILS16 typedef struct _ACMDRIVERDETAILS16
{ {
DWORD cbStruct; DWORD cbStruct;
...@@ -356,6 +361,9 @@ typedef struct _ACMFILTERCHOOSEW ...@@ -356,6 +361,9 @@ typedef struct _ACMFILTERCHOOSEW
ACMFILTERCHOOSEHOOKPROCW pfnHook; ACMFILTERCHOOSEHOOKPROCW pfnHook;
} ACMFILTERCHOOSEW, *PACMFILTERCHOOSEW; } ACMFILTERCHOOSEW, *PACMFILTERCHOOSEW;
DECL_WINELIB_TYPE_AW(ACMFILTERCHOOSE);
DECL_WINELIB_TYPE_AW(PACMFILTERCHOOSE);
typedef struct _ACMFILTERCHOOSE16 typedef struct _ACMFILTERCHOOSE16
{ {
DWORD cbStruct; DWORD cbStruct;
...@@ -404,6 +412,9 @@ typedef struct _ACMFILTERDETAILSW ...@@ -404,6 +412,9 @@ typedef struct _ACMFILTERDETAILSW
WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS]; WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
} ACMFILTERDETAILSW, *PACMFILTERDETAILSW; } ACMFILTERDETAILSW, *PACMFILTERDETAILSW;
DECL_WINELIB_TYPE_AW(ACMFILTERDETAILS);
DECL_WINELIB_TYPE_AW(PACMFILTERDETAILS);
typedef struct _ACMFILTERDETAILS16 typedef struct _ACMFILTERDETAILS16
{ {
DWORD cbStruct; DWORD cbStruct;
...@@ -437,6 +448,9 @@ typedef struct _ACMFILTERTAGDETAILSW ...@@ -437,6 +448,9 @@ typedef struct _ACMFILTERTAGDETAILSW
WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]; WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
} ACMFILTERTAGDETAILSW, *PACMFILTERTAGDETAILSW; } ACMFILTERTAGDETAILSW, *PACMFILTERTAGDETAILSW;
DECL_WINELIB_TYPE_AW(ACMFILTERTAGDETAILS);
DECL_WINELIB_TYPE_AW(PACMFILTERTAGDETAILS);
typedef struct _ACMFILTERTAGDETAILS16 typedef struct _ACMFILTERTAGDETAILS16
{ {
DWORD cbStruct; DWORD cbStruct;
...@@ -500,6 +514,9 @@ typedef struct _ACMFORMATCHOOSEW ...@@ -500,6 +514,9 @@ typedef struct _ACMFORMATCHOOSEW
ACMFORMATCHOOSEHOOKPROCW pfnHook; ACMFORMATCHOOSEHOOKPROCW pfnHook;
} ACMFORMATCHOOSEW, *PACMFORMATCHOOSEW; } ACMFORMATCHOOSEW, *PACMFORMATCHOOSEW;
DECL_WINELIB_TYPE_AW(ACMFORMATCHOOSE);
DECL_WINELIB_TYPE_AW(PACMFORMATCHOOSE);
typedef struct _ACMFORMATCHOOSE16 typedef struct _ACMFORMATCHOOSE16
{ {
DWORD cbStruct; DWORD cbStruct;
...@@ -548,6 +565,9 @@ typedef struct _ACMFORMATDETAILSW ...@@ -548,6 +565,9 @@ typedef struct _ACMFORMATDETAILSW
WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]; WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
} ACMFORMATDETAILSW, *PACMFORMATDETAILSW; } ACMFORMATDETAILSW, *PACMFORMATDETAILSW;
DECL_WINELIB_TYPE_AW(ACMFORMATDETAILS);
DECL_WINELIB_TYPE_AW(PACMFORMATDETAILS);
typedef struct _ACMFORMATDETAILS16 typedef struct _ACMFORMATDETAILS16
{ {
DWORD cbStruct; DWORD cbStruct;
...@@ -581,6 +601,9 @@ typedef struct _ACMFORMATTAGDETAILSW ...@@ -581,6 +601,9 @@ typedef struct _ACMFORMATTAGDETAILSW
WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]; WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
} ACMFORMATTAGDETAILSW, *PACMFORMATTAGDETAILSW; } ACMFORMATTAGDETAILSW, *PACMFORMATTAGDETAILSW;
DECL_WINELIB_TYPE_AW(ACMFORMATTAGDETAILS);
DECL_WINELIB_TYPE_AW(PACMFORMATTAGDETAILS);
typedef struct _ACMFORMATTAGDETAILS16 typedef struct _ACMFORMATTAGDETAILS16
{ {
DWORD cbStruct; DWORD cbStruct;
...@@ -623,6 +646,8 @@ typedef BOOL CALLBACK (*ACMFILTERENUMCBW)( ...@@ -623,6 +646,8 @@ typedef BOOL CALLBACK (*ACMFILTERENUMCBW)(
DWORD dwInstance, DWORD fdwSupport DWORD dwInstance, DWORD fdwSupport
); );
#define ACMFILTERENUMCB WINELIB_NAME_AW(ACMFILTERENUMCB)
typedef BOOL16 CALLBACK (*ACMFILTERENUMCB16)( typedef BOOL16 CALLBACK (*ACMFILTERENUMCB16)(
HACMDRIVERID16 hadid, LPACMFILTERDETAILS16 pafd, HACMDRIVERID16 hadid, LPACMFILTERDETAILS16 pafd,
DWORD dwInstance, DWORD fdwSupport DWORD dwInstance, DWORD fdwSupport
...@@ -638,6 +663,8 @@ typedef BOOL CALLBACK (*ACMFILTERTAGENUMCBW)( ...@@ -638,6 +663,8 @@ typedef BOOL CALLBACK (*ACMFILTERTAGENUMCBW)(
DWORD dwInstance, DWORD fdwSupport DWORD dwInstance, DWORD fdwSupport
); );
#define ACMFILTERTAGENUMCB WINELIB_NAME_AW(ACMFILTERTAGENUMCB)
typedef BOOL16 CALLBACK (*ACMFILTERTAGENUMCB16)( typedef BOOL16 CALLBACK (*ACMFILTERTAGENUMCB16)(
HACMDRIVERID16 hadid, LPACMFILTERTAGDETAILS16 paftd, HACMDRIVERID16 hadid, LPACMFILTERTAGDETAILS16 paftd,
DWORD dwInstance, DWORD fdwSupport DWORD dwInstance, DWORD fdwSupport
...@@ -653,6 +680,8 @@ typedef BOOL CALLBACK (*ACMFORMATENUMCBW)( ...@@ -653,6 +680,8 @@ typedef BOOL CALLBACK (*ACMFORMATENUMCBW)(
DWORD dwInstance, DWORD fdwSupport DWORD dwInstance, DWORD fdwSupport
); );
#define ACMFORMATENUMCB WINELIB_NAME_AW(ACMFORMATENUMCB)
typedef BOOL16 CALLBACK (*ACMFORMATENUMCB16)( typedef BOOL16 CALLBACK (*ACMFORMATENUMCB16)(
HACMDRIVERID16 hadid, LPACMFORMATDETAILS16 pafd, HACMDRIVERID16 hadid, LPACMFORMATDETAILS16 pafd,
DWORD dwInstance, DWORD fdwSupport DWORD dwInstance, DWORD fdwSupport
...@@ -668,6 +697,8 @@ typedef BOOL CALLBACK (*ACMFORMATTAGENUMCBW)( ...@@ -668,6 +697,8 @@ typedef BOOL CALLBACK (*ACMFORMATTAGENUMCBW)(
DWORD dwInstance, DWORD fdwSupport DWORD dwInstance, DWORD fdwSupport
); );
#define ACMFORMATTAGENUMCB WINELIB_NAME_AW(ACMFORMATTAGENUMCB)
typedef BOOL16 CALLBACK (*ACMFORMATTAGENUMCB16)( typedef BOOL16 CALLBACK (*ACMFORMATTAGENUMCB16)(
HACMDRIVERID16 hadid, LPACMFORMATTAGDETAILS16 paftd, HACMDRIVERID16 hadid, LPACMFORMATTAGDETAILS16 paftd,
DWORD dwInstance, DWORD fdwSupport DWORD dwInstance, DWORD fdwSupport
...@@ -786,6 +817,8 @@ MMRESULT WINAPI acmDriverAddW( ...@@ -786,6 +817,8 @@ MMRESULT WINAPI acmDriverAddW(
PHACMDRIVERID phadid, HINSTANCE hinstModule, PHACMDRIVERID phadid, HINSTANCE hinstModule,
LPARAM lParam, DWORD dwPriority, DWORD fdwAdd LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
); );
#define acmDriverAdd WINELIB_NAME_AW(acmDriverAdd)
MMRESULT WINAPI acmDriverClose( MMRESULT WINAPI acmDriverClose(
HACMDRIVER had, DWORD fdwClose HACMDRIVER had, DWORD fdwClose
); );
...@@ -795,6 +828,8 @@ MMRESULT WINAPI acmDriverDetailsA( ...@@ -795,6 +828,8 @@ MMRESULT WINAPI acmDriverDetailsA(
MMRESULT WINAPI acmDriverDetailsW( MMRESULT WINAPI acmDriverDetailsW(
HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails
); );
#define acmDriverDetails WINELIB_NAME_AW(acmDriverDetails)
MMRESULT WINAPI acmDriverEnum( MMRESULT WINAPI acmDriverEnum(
ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum
); );
...@@ -819,12 +854,16 @@ MMRESULT WINAPI acmFilterChooseA( ...@@ -819,12 +854,16 @@ MMRESULT WINAPI acmFilterChooseA(
MMRESULT WINAPI acmFilterChooseW( MMRESULT WINAPI acmFilterChooseW(
PACMFILTERCHOOSEW pafltrc PACMFILTERCHOOSEW pafltrc
); );
#define acmFilterChoose WINELIB_NAME_AW(acmFilterChoose)
MMRESULT WINAPI acmFilterDetailsA( MMRESULT WINAPI acmFilterDetailsA(
HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails
); );
MMRESULT WINAPI acmFilterDetailsW( MMRESULT WINAPI acmFilterDetailsW(
HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails
); );
#define acmFilterDetails WINELIB_NAME_AW(acmFilterDetails)
MMRESULT WINAPI acmFilterEnumA( MMRESULT WINAPI acmFilterEnumA(
HACMDRIVER had, PACMFILTERDETAILSA pafd, HACMDRIVER had, PACMFILTERDETAILSA pafd,
ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
...@@ -833,12 +872,16 @@ MMRESULT WINAPI acmFilterEnumW( ...@@ -833,12 +872,16 @@ MMRESULT WINAPI acmFilterEnumW(
HACMDRIVER had, PACMFILTERDETAILSW pafd, HACMDRIVER had, PACMFILTERDETAILSW pafd,
ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
); );
#define acmFilterEnum WINELIB_NAME_AW(acmFilterEnum)
MMRESULT WINAPI acmFilterTagDetailsA( MMRESULT WINAPI acmFilterTagDetailsA(
HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, DWORD fdwDetails HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, DWORD fdwDetails
); );
MMRESULT WINAPI acmFilterTagDetailsW( MMRESULT WINAPI acmFilterTagDetailsW(
HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails
); );
#define acmFilterTagDetails WINELIB_NAME_AW(acmFilterTagDetails)
MMRESULT WINAPI acmFilterTagEnumA( MMRESULT WINAPI acmFilterTagEnumA(
HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, HACMDRIVER had, PACMFILTERTAGDETAILSA paftd,
ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
...@@ -847,18 +890,24 @@ MMRESULT WINAPI acmFilterTagEnumW( ...@@ -847,18 +890,24 @@ MMRESULT WINAPI acmFilterTagEnumW(
HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
); );
#define acmFilterTagEnum WINELIB_NAME_AW(acmFilterTagEnum)
MMRESULT WINAPI acmFormatChooseA( MMRESULT WINAPI acmFormatChooseA(
PACMFORMATCHOOSEA pafmtc PACMFORMATCHOOSEA pafmtc
); );
MMRESULT WINAPI acmFormatChooseW( MMRESULT WINAPI acmFormatChooseW(
PACMFORMATCHOOSEW pafmtc PACMFORMATCHOOSEW pafmtc
); );
#define acmFormatChoose WINELIB_NAME_AW(acmFormatChoose)
MMRESULT WINAPI acmFormatDetailsA( MMRESULT WINAPI acmFormatDetailsA(
HACMDRIVER had, PACMFORMATDETAILSA pafd, DWORD fdwDetails HACMDRIVER had, PACMFORMATDETAILSA pafd, DWORD fdwDetails
); );
MMRESULT WINAPI acmFormatDetailsW( MMRESULT WINAPI acmFormatDetailsW(
HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails
); );
#define acmFormatDetails WINELIB_NAME_AW(acmFormatDetails)
MMRESULT WINAPI acmFormatEnumA( MMRESULT WINAPI acmFormatEnumA(
HACMDRIVER had, PACMFORMATDETAILSA pafd, HACMDRIVER had, PACMFORMATDETAILSA pafd,
ACMFORMATENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum ACMFORMATENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
...@@ -867,6 +916,8 @@ MMRESULT WINAPI acmFormatEnumW( ...@@ -867,6 +916,8 @@ MMRESULT WINAPI acmFormatEnumW(
HACMDRIVER had, PACMFORMATDETAILSW pafd, HACMDRIVER had, PACMFORMATDETAILSW pafd,
ACMFORMATENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum ACMFORMATENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
); );
#define acmFormatEnum WINELIB_NAME_AW(acmFormatEnum)
MMRESULT WINAPI acmFormatSuggest( MMRESULT WINAPI acmFormatSuggest(
HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst, HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst,
DWORD cbwfxDst, DWORD fdwSuggest DWORD cbwfxDst, DWORD fdwSuggest
...@@ -877,6 +928,8 @@ MMRESULT WINAPI acmFormatTagDetailsA( ...@@ -877,6 +928,8 @@ MMRESULT WINAPI acmFormatTagDetailsA(
MMRESULT WINAPI acmFormatTagDetailsW( MMRESULT WINAPI acmFormatTagDetailsW(
HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails
); );
#define acmFormatTagDetails WINELIB_NAME_AW(acmFormatTagDetails)
MMRESULT WINAPI acmFormatTagEnumA( MMRESULT WINAPI acmFormatTagEnumA(
HACMDRIVER had, PACMFORMATTAGDETAILSA paftd, HACMDRIVER had, PACMFORMATTAGDETAILSA paftd,
ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
...@@ -885,6 +938,8 @@ MMRESULT WINAPI acmFormatTagEnumW( ...@@ -885,6 +938,8 @@ MMRESULT WINAPI acmFormatTagEnumW(
HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
); );
#define acmFormatTagEnum WINELIB_NAME_AW(acmFormatTagEnum)
DWORD WINAPI acmGetVersion( DWORD WINAPI acmGetVersion(
); );
MMRESULT WINAPI acmMetrics( MMRESULT WINAPI acmMetrics(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment