sync msacm with wine 1.1.27

svn path=/trunk/; revision=42522
This commit is contained in:
Christoph von Wittich 2009-08-08 16:14:46 +00:00
parent 0656aaaacd
commit 24c3dd1abc
38 changed files with 4204 additions and 3028 deletions

View file

@ -19,6 +19,9 @@
#ifndef __AVIFILE_PRIVATE_H
#define __AVIFILE_PRIVATE_H
#include <windef.h>
#include <winuser.h>
#ifndef MAX_AVISTREAMS
#define MAX_AVISTREAMS 8
#endif

View file

@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
@ -29,17 +29,16 @@
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "winreg.h"
#include "mmsystem.h"
#include "mmreg.h"
#include "msacm.h"
#include "msacmdrv.h"
#include "wineacm.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(msacm);
@ -49,7 +48,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(msacm);
MMRESULT WINAPI acmDriverAddA(PHACMDRIVERID phadid, HINSTANCE hinstModule,
LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
{
TRACE("(%p, %p, %08lx, %08lx, %08lx)\n",
MMRESULT resultW;
WCHAR * driverW = NULL;
LPARAM lParamW = lParam;
TRACE("(%p, %p, %08lx, %08x, %08x)\n",
phadid, hinstModule, lParam, dwPriority, fdwAdd);
if (!phadid) {
@ -72,30 +75,105 @@ MMRESULT WINAPI acmDriverAddA(PHACMDRIVERID phadid, HINSTANCE hinstModule,
return MMSYSERR_INVALFLAG;
}
/* FIXME: in fact, should GetModuleFileName(hinstModule) and do a
* LoadDriver on it, to be sure we can call SendDriverMessage on the
* hDrvr handle.
*/
*phadid = (HACMDRIVERID) MSACM_RegisterDriver(NULL, NULL, hinstModule);
/* A->W translation of name */
if ((fdwAdd & ACM_DRIVERADDF_TYPEMASK) == ACM_DRIVERADDF_NAME) {
unsigned long len;
if (lParam == 0) return MMSYSERR_INVALPARAM;
len = MultiByteToWideChar(CP_ACP, 0, (LPSTR)lParam, -1, NULL, 0);
driverW = HeapAlloc(MSACM_hHeap, 0, len * sizeof(WCHAR));
if (!driverW) return MMSYSERR_NOMEM;
MultiByteToWideChar(CP_ACP, 0, (LPSTR)lParam, -1, driverW, len);
lParamW = (LPARAM)driverW;
}
/* FIXME: lParam, dwPriority and fdwAdd ignored */
return MMSYSERR_NOERROR;
resultW = acmDriverAddW(phadid, hinstModule, lParamW, dwPriority, fdwAdd);
HeapFree(MSACM_hHeap, 0, driverW);
return resultW;
}
/***********************************************************************
* acmDriverAddW (MSACM32.@)
* FIXME
* Not implemented
*
*/
MMRESULT WINAPI acmDriverAddW(PHACMDRIVERID phadid, HINSTANCE hinstModule,
LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
{
FIXME("(%p, %p, %ld, %ld, %ld): stub\n",
phadid, hinstModule, lParam, dwPriority, fdwAdd);
PWINE_ACMLOCALDRIVER pLocalDrv = NULL;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return MMSYSERR_ERROR;
TRACE("(%p, %p, %08lx, %08x, %08x)\n",
phadid, hinstModule, lParam, dwPriority, fdwAdd);
if (!phadid) {
WARN("invalid parameter\n");
return MMSYSERR_INVALPARAM;
}
/* Check if any unknown flags */
if (fdwAdd &
~(ACM_DRIVERADDF_FUNCTION|ACM_DRIVERADDF_NOTIFYHWND|
ACM_DRIVERADDF_GLOBAL)) {
WARN("invalid flag\n");
return MMSYSERR_INVALFLAG;
}
/* Check if any incompatible flags */
if ((fdwAdd & ACM_DRIVERADDF_FUNCTION) &&
(fdwAdd & ACM_DRIVERADDF_NOTIFYHWND)) {
WARN("invalid flag\n");
return MMSYSERR_INVALFLAG;
}
switch (fdwAdd & ACM_DRIVERADDF_TYPEMASK) {
case ACM_DRIVERADDF_NAME:
/*
hInstModule (unused)
lParam name of value in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
dwPriority (unused, set to 0)
*/
*phadid = (HACMDRIVERID) MSACM_RegisterDriverFromRegistry((LPCWSTR)lParam);
if (!*phadid) {
ERR("Unable to register driver via ACM_DRIVERADDF_NAME\n");
return MMSYSERR_INVALPARAM;
}
break;
case ACM_DRIVERADDF_FUNCTION:
/*
hInstModule Handle of module which contains driver entry proc
lParam Driver function address
dwPriority (unused, set to 0)
*/
fdwAdd &= ~ACM_DRIVERADDF_TYPEMASK;
/* FIXME: fdwAdd ignored */
/* Application-supplied acmDriverProc's are placed at the top of the priority unless
fdwAdd indicates ACM_DRIVERADDF_GLOBAL
*/
pLocalDrv = MSACM_RegisterLocalDriver(hinstModule, (DRIVERPROC)lParam);
*phadid = pLocalDrv ? (HACMDRIVERID) MSACM_RegisterDriver(NULL, NULL, pLocalDrv) : NULL;
if (!*phadid) {
ERR("Unable to register driver via ACM_DRIVERADDF_FUNCTION\n");
return MMSYSERR_INVALPARAM;
}
break;
case ACM_DRIVERADDF_NOTIFYHWND:
/*
hInstModule (unused)
lParam Handle of notification window
dwPriority Window message to send for notification broadcasts
*/
*phadid = (HACMDRIVERID) MSACM_RegisterNotificationWindow((HWND)lParam, dwPriority);
if (!*phadid) {
ERR("Unable to register driver via ACM_DRIVERADDF_NOTIFYHWND\n");
return MMSYSERR_INVALPARAM;
}
break;
default:
ERR("invalid flag value 0x%08lx for fdwAdd\n", fdwAdd & ACM_DRIVERADDF_TYPEMASK);
return MMSYSERR_INVALFLAG;
}
MSACM_BroadcastNotification();
return MMSYSERR_NOERROR;
}
/***********************************************************************
@ -107,7 +185,7 @@ MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
PWINE_ACMDRIVERID padid;
PWINE_ACMDRIVER* tpad;
TRACE("(%p, %08lx)\n", had, fdwClose);
TRACE("(%p, %08x)\n", had, fdwClose);
if (fdwClose) {
WARN("invalid flag\n");
@ -123,7 +201,7 @@ MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
padid = pad->obj.pACMDriverID;
/* remove driver from list */
for (tpad = &(padid->pACMDriverList); *tpad; *tpad = (*tpad)->pNextACMDriver) {
for (tpad = &(padid->pACMDriverList); *tpad; tpad = &((*tpad)->pNextACMDriver)) {
if (*tpad == pad) {
*tpad = (*tpad)->pNextACMDriver;
break;
@ -131,8 +209,10 @@ MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
}
/* close driver if it has been opened */
if (pad->hDrvr && !padid->hInstModule)
if (pad->hDrvr && !pad->pLocalDrvrInst)
CloseDriver(pad->hDrvr, 0, 0);
else if (pad->pLocalDrvrInst)
MSACM_CloseLocalDriver(pad->pLocalDrvrInst);
HeapFree(MSACM_hHeap, 0, pad);
@ -147,7 +227,7 @@ MMRESULT WINAPI acmDriverDetailsA(HACMDRIVERID hadid, PACMDRIVERDETAILSA padd, D
MMRESULT mmr;
ACMDRIVERDETAILSW addw;
TRACE("(%p, %p, %08lx)\n", hadid, padd, fdwDetails);
TRACE("(%p, %p, %08x)\n", hadid, padd, fdwDetails);
if (!padd) {
WARN("invalid parameter\n");
@ -184,7 +264,8 @@ MMRESULT WINAPI acmDriverDetailsA(HACMDRIVERID hadid, PACMDRIVERDETAILSA padd, D
sizeof(padda.szLicensing), NULL, NULL );
WideCharToMultiByte( CP_ACP, 0, addw.szFeatures, -1, padda.szFeatures,
sizeof(padda.szFeatures), NULL, NULL );
memcpy(padd, &padda, min(padd->cbStruct, sizeof(*padd)));
padda.cbStruct = min(padd->cbStruct, sizeof(*padd));
memcpy(padd, &padda, padda.cbStruct);
}
return mmr;
}
@ -197,7 +278,7 @@ MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, D
HACMDRIVER acmDrvr;
MMRESULT mmr;
TRACE("(%p, %p, %08lx)\n", hadid, padd, fdwDetails);
TRACE("(%p, %p, %08x)\n", hadid, padd, fdwDetails);
if (!padd) {
WARN("invalid parameter\n");
@ -217,10 +298,12 @@ MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, D
mmr = acmDriverOpen(&acmDrvr, hadid, 0);
if (mmr == MMSYSERR_NOERROR) {
ACMDRIVERDETAILSW paddw;
mmr = (MMRESULT)MSACM_Message(acmDrvr, ACMDM_DRIVER_DETAILS, (LPARAM)&paddw, 0);
paddw.cbStruct = sizeof(paddw);
mmr = MSACM_Message(acmDrvr, ACMDM_DRIVER_DETAILS, (LPARAM)&paddw, 0);
acmDriverClose(acmDrvr, 0);
memcpy(padd, &paddw, min(padd->cbStruct, sizeof(*padd)));
paddw.cbStruct = min(padd->cbStruct, sizeof(*padd));
memcpy(padd, &paddw, paddw.cbStruct);
}
return mmr;
@ -229,12 +312,13 @@ MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, D
/***********************************************************************
* acmDriverEnum (MSACM32.@)
*/
MMRESULT WINAPI acmDriverEnum(ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum)
MMRESULT WINAPI acmDriverEnum(ACMDRIVERENUMCB fnCallback, DWORD_PTR dwInstance,
DWORD fdwEnum)
{
PWINE_ACMDRIVERID padid;
DWORD fdwSupport;
TRACE("(%p, %08lx, %08lx)\n", fnCallback, dwInstance, fdwEnum);
TRACE("(%p, %08lx, %08x)\n", fnCallback, dwInstance, fdwEnum);
if (!fnCallback) {
WARN("invalid parameter\n");
@ -269,7 +353,7 @@ MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID
{
PWINE_ACMOBJ pao;
TRACE("(%p, %p, %08lx)\n", hao, phadid, fdwDriverID);
TRACE("(%p, %p, %08x)\n", hao, phadid, fdwDriverID);
if (fdwDriverID) {
WARN("invalid flag\n");
@ -295,6 +379,15 @@ MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID
/***********************************************************************
* acmDriverMessage (MSACM32.@)
*
* Note: MSDN documentation (July 2001) is incomplete. This function
* accepts sending messages to an HACMDRIVERID in addition to the
* documented HACMDRIVER. In fact, for DRV_QUERYCONFIGURE and DRV_CONFIGURE,
* this might actually be the required mode of operation.
*
* Note: For DRV_CONFIGURE, msacm supplies its own DRVCONFIGINFO structure
* when the application fails to supply one. Some native drivers depend on
* this and refuse to display unless a valid DRVCONFIGINFO structure is
* built and supplied.
*/
LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
{
@ -304,8 +397,90 @@ LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARA
uMsg == ACMDM_DRIVER_ABOUT ||
uMsg == DRV_QUERYCONFIGURE ||
uMsg == DRV_CONFIGURE)
return MSACM_Message(had, uMsg, lParam1, lParam2);
{
PWINE_ACMDRIVERID padid;
LRESULT lResult;
LPDRVCONFIGINFO pConfigInfo = NULL;
LPWSTR section_name = NULL;
LPWSTR alias_name = NULL;
/* Check whether handle is an HACMDRIVERID */
padid = MSACM_GetDriverID((HACMDRIVERID)had);
/* If the message is DRV_CONFIGURE, and the application provides no
DRVCONFIGINFO structure, msacm must supply its own.
*/
if (uMsg == DRV_CONFIGURE && lParam2 == 0) {
LPWSTR pAlias;
/* Get the alias from the HACMDRIVERID */
if (padid) {
pAlias = padid->pszDriverAlias;
if (pAlias == NULL) {
WARN("DRV_CONFIGURE: no alias for this driver, cannot self-supply alias\n");
}
} else {
FIXME("DRV_CONFIGURE: reverse lookup HACMDRIVER -> HACMDRIVERID not implemented\n");
pAlias = NULL;
}
if (pAlias != NULL) {
/* DRVCONFIGINFO is only 12 bytes long, but native msacm
* reports a 16-byte structure to codecs, so allocate 16 bytes,
* just to be on the safe side.
*/
const unsigned int iStructSize = 16;
pConfigInfo = HeapAlloc(MSACM_hHeap, 0, iStructSize);
if (!pConfigInfo) {
ERR("OOM while supplying DRVCONFIGINFO for DRV_CONFIGURE, using NULL\n");
} else {
static const WCHAR drivers32[] = {'D','r','i','v','e','r','s','3','2','\0'};
pConfigInfo->dwDCISize = iStructSize;
section_name = HeapAlloc(MSACM_hHeap, 0, (strlenW(drivers32) + 1) * sizeof(WCHAR));
if (section_name) strcpyW(section_name, drivers32);
pConfigInfo->lpszDCISectionName = section_name;
alias_name = HeapAlloc(MSACM_hHeap, 0, (strlenW(pAlias) + 1) * sizeof(WCHAR));
if (alias_name) strcpyW(alias_name, pAlias);
pConfigInfo->lpszDCIAliasName = alias_name;
if (pConfigInfo->lpszDCISectionName == NULL || pConfigInfo->lpszDCIAliasName == NULL) {
HeapFree(MSACM_hHeap, 0, alias_name);
HeapFree(MSACM_hHeap, 0, section_name);
HeapFree(MSACM_hHeap, 0, pConfigInfo);
pConfigInfo = NULL;
ERR("OOM while supplying DRVCONFIGINFO for DRV_CONFIGURE, using NULL\n");
}
}
}
lParam2 = (LPARAM)pConfigInfo;
}
if (padid) {
/* Handle is really an HACMDRIVERID, must have an open session to get an HACMDRIVER */
if (padid->pACMDriverList != NULL) {
lResult = MSACM_Message((HACMDRIVER)padid->pACMDriverList, uMsg, lParam1, lParam2);
} else {
MMRESULT mmr = acmDriverOpen(&had, (HACMDRIVERID)padid, 0);
if (mmr != MMSYSERR_NOERROR) {
lResult = MMSYSERR_INVALPARAM;
} else {
lResult = acmDriverMessage(had, uMsg, lParam1, lParam2);
acmDriverClose(had, 0);
}
}
} else {
lResult = MSACM_Message(had, uMsg, lParam1, lParam2);
}
if (pConfigInfo) {
HeapFree(MSACM_hHeap, 0, alias_name);
HeapFree(MSACM_hHeap, 0, section_name);
HeapFree(MSACM_hHeap, 0, pConfigInfo);
}
return lResult;
}
WARN("invalid parameter\n");
return MMSYSERR_INVALPARAM;
}
@ -319,7 +494,7 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe
PWINE_ACMDRIVER pad = NULL;
MMRESULT ret;
TRACE("(%p, %p, %08lu)\n", phad, hadid, fdwOpen);
TRACE("(%p, %p, %08u)\n", phad, hadid, fdwOpen);
if (!phad) {
WARN("invalid parameter\n");
@ -345,11 +520,14 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe
pad->obj.dwType = WINE_ACMOBJ_DRIVER;
pad->obj.pACMDriverID = padid;
pad->hDrvr = 0;
pad->pLocalDrvrInst = NULL;
if (!(pad->hDrvr = (HDRVR)padid->hInstModule))
if (padid->pLocalDriver == NULL)
{
ACMDRVOPENDESCW adod;
int len;
LPWSTR section_name;
/* this is not an externally added driver... need to actually load it */
if (!padid->pszDriverAlias)
@ -365,20 +543,44 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe
adod.dwFlags = fdwOpen;
adod.dwError = 0;
len = strlen("Drivers32") + 1;
adod.pszSectionName = HeapAlloc(MSACM_hHeap, 0, len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, "Drivers32", -1, (LPWSTR)adod.pszSectionName, len);
section_name = HeapAlloc(MSACM_hHeap, 0, len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, "Drivers32", -1, section_name, len);
adod.pszSectionName = section_name;
adod.pszAliasName = padid->pszDriverAlias;
adod.dnDevNode = 0;
pad->hDrvr = OpenDriver(padid->pszDriverAlias, NULL, (DWORD)&adod);
pad->hDrvr = OpenDriver(padid->pszDriverAlias, NULL, (DWORD_PTR)&adod);
HeapFree(MSACM_hHeap, 0, (LPWSTR)adod.pszSectionName);
HeapFree(MSACM_hHeap, 0, section_name);
if (!pad->hDrvr)
{
ret = adod.dwError;
goto gotError;
}
}
else
{
ACMDRVOPENDESCW adod;
pad->hDrvr = NULL;
adod.cbStruct = sizeof(adod);
adod.fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC;
adod.fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED;
adod.dwVersion = acmGetVersion();
adod.dwFlags = fdwOpen;
adod.dwError = 0;
adod.pszSectionName = NULL;
adod.pszAliasName = NULL;
adod.dnDevNode = 0;
pad->pLocalDrvrInst = MSACM_OpenLocalDriver(padid->pLocalDriver, (DWORD_PTR)&adod);
if (!pad->pLocalDrvrInst)
{
ret = adod.dwError;
goto gotError;
}
}
/* insert new pad at beg of list */
pad->pNextACMDriver = padid->pACMDriverList;
@ -386,7 +588,7 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe
/* FIXME: Create a WINE_ACMDRIVER32 */
*phad = (HACMDRIVER)pad;
TRACE("'%s' => %08lx\n", debugstr_w(padid->pszDriverAlias), (DWORD)pad);
TRACE("%s => %p\n", debugstr_w(padid->pszDriverAlias), pad);
return MMSYSERR_NOERROR;
gotError:
@ -401,21 +603,8 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe
*/
MMRESULT WINAPI acmDriverPriority(HACMDRIVERID hadid, DWORD dwPriority, DWORD fdwPriority)
{
PWINE_ACMDRIVERID padid;
CHAR szSubKey[17];
CHAR szBuffer[256];
LONG lBufferLength = sizeof(szBuffer);
LONG lError;
HKEY hPriorityKey;
DWORD dwPriorityCounter;
TRACE("(%p, %08lx, %08lx)\n", hadid, dwPriority, fdwPriority);
padid = MSACM_GetDriverID(hadid);
if (!padid) {
WARN("invalid handle\n");
return MMSYSERR_INVALHANDLE;
}
TRACE("(%p, %08x, %08x)\n", hadid, dwPriority, fdwPriority);
/* Check for unknown flags */
if (fdwPriority &
@ -438,33 +627,114 @@ MMRESULT WINAPI acmDriverPriority(HACMDRIVERID hadid, DWORD dwPriority, DWORD fd
WARN("invalid flag\n");
return MMSYSERR_INVALFLAG;
}
/* According to MSDN, ACM_DRIVERPRIORITYF_BEGIN and ACM_DRIVERPRIORITYF_END
may only appear by themselves, and in addition, hadid and dwPriority must
both be zero */
if ((fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) ||
(fdwPriority & ACM_DRIVERPRIORITYF_END)) {
if (fdwPriority & ~(ACM_DRIVERPRIORITYF_BEGIN|ACM_DRIVERPRIORITYF_END)) {
WARN("ACM_DRIVERPRIORITYF_[BEGIN|END] cannot be used with any other flags\n");
return MMSYSERR_INVALPARAM;
}
if (dwPriority) {
WARN("priority invalid with ACM_DRIVERPRIORITYF_[BEGIN|END]\n");
return MMSYSERR_INVALPARAM;
}
if (hadid) {
WARN("non-null hadid invalid with ACM_DRIVERPRIORITYF_[BEGIN|END]\n");
return MMSYSERR_INVALPARAM;
}
/* FIXME: MSDN wording suggests that deferred notification should be
implemented as a system-wide lock held by a calling task, and that
re-enabling notifications should broadcast them across all processes.
This implementation uses a simple DWORD counter. One consequence of the
current implementation is that applications will never see
MMSYSERR_ALLOCATED as a return error.
*/
if (fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) {
MSACM_DisableNotifications();
} else if (fdwPriority & ACM_DRIVERPRIORITYF_END) {
MSACM_EnableNotifications();
}
return MMSYSERR_NOERROR;
} else {
PWINE_ACMDRIVERID padid;
PWINE_ACMNOTIFYWND panwnd;
BOOL bPerformBroadcast = FALSE;
lError = RegOpenKeyA(HKEY_CURRENT_USER,
"Software\\Microsoft\\Multimedia\\"
"Audio Compression Manager\\Priority v4.00",
&hPriorityKey
);
/* FIXME: Create key */
if (lError != ERROR_SUCCESS) {
WARN("RegOpenKeyA failed\n");
return MMSYSERR_ERROR;
/* Fetch driver ID */
padid = MSACM_GetDriverID(hadid);
panwnd = MSACM_GetNotifyWnd(hadid);
if (!padid && !panwnd) {
WARN("invalid handle\n");
return MMSYSERR_INVALHANDLE;
}
if (padid) {
/* Check whether driver ID is appropriate for requested op */
if (dwPriority) {
if (padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_LOCAL) {
return MMSYSERR_NOTSUPPORTED;
}
if (dwPriority != 1 && dwPriority != (DWORD)-1) {
FIXME("unexpected priority %d, using sign only\n", dwPriority);
if ((signed)dwPriority < 0) dwPriority = (DWORD)-1;
if (dwPriority > 0) dwPriority = 1;
}
if (dwPriority == 1 && (padid->pPrevACMDriverID == NULL ||
(padid->pPrevACMDriverID->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_LOCAL))) {
/* do nothing - driver is first of list, or first after last
local driver */
} else if (dwPriority == (DWORD)-1 && padid->pNextACMDriverID == NULL) {
/* do nothing - driver is last of list */
} else {
MSACM_RePositionDriver(padid, dwPriority);
bPerformBroadcast = TRUE;
}
}
/* Check whether driver ID should be enabled or disabled */
if (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE) {
if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED)) {
padid->fdwSupport |= ACMDRIVERDETAILS_SUPPORTF_DISABLED;
bPerformBroadcast = TRUE;
}
} else if (fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) {
if (padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) {
padid->fdwSupport &= ~ACMDRIVERDETAILS_SUPPORTF_DISABLED;
bPerformBroadcast = TRUE;
}
}
}
if (panwnd) {
if (dwPriority) {
return MMSYSERR_NOTSUPPORTED;
}
/* Check whether notify window should be enabled or disabled */
if (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE) {
if (!(panwnd->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED)) {
panwnd->fdwSupport |= ACMDRIVERDETAILS_SUPPORTF_DISABLED;
bPerformBroadcast = TRUE;
}
} else if (fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) {
if (panwnd->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) {
panwnd->fdwSupport &= ~ACMDRIVERDETAILS_SUPPORTF_DISABLED;
bPerformBroadcast = TRUE;
}
}
}
/* Perform broadcast of changes */
if (bPerformBroadcast) {
MSACM_WriteCurrentPriorities();
MSACM_BroadcastNotification();
}
return MMSYSERR_NOERROR;
}
for (dwPriorityCounter = 1; ; dwPriorityCounter++) {
snprintf(szSubKey, 17, "Priority%ld", dwPriorityCounter);
lError = RegQueryValueA(hPriorityKey, szSubKey, szBuffer, &lBufferLength);
if (lError != ERROR_SUCCESS)
break;
FIXME("(%p, %ld, %ld): stub (partial)\n",
hadid, dwPriority, fdwPriority);
break;
}
RegCloseKey(hPriorityKey);
WARN("RegQueryValueA failed\n");
return MMSYSERR_ERROR;
}
/***********************************************************************
@ -473,11 +743,13 @@ MMRESULT WINAPI acmDriverPriority(HACMDRIVERID hadid, DWORD dwPriority, DWORD fd
MMRESULT WINAPI acmDriverRemove(HACMDRIVERID hadid, DWORD fdwRemove)
{
PWINE_ACMDRIVERID padid;
PWINE_ACMNOTIFYWND panwnd;
TRACE("(%p, %08lx)\n", hadid, fdwRemove);
TRACE("(%p, %08x)\n", hadid, fdwRemove);
padid = MSACM_GetDriverID(hadid);
if (!padid) {
panwnd = MSACM_GetNotifyWnd(hadid);
if (!padid && !panwnd) {
WARN("invalid handle\n");
return MMSYSERR_INVALHANDLE;
}
@ -487,7 +759,9 @@ MMRESULT WINAPI acmDriverRemove(HACMDRIVERID hadid, DWORD fdwRemove)
return MMSYSERR_INVALFLAG;
}
MSACM_UnregisterDriver(padid);
if (padid) MSACM_UnregisterDriver(padid);
if (panwnd) MSACM_UnRegisterNotificationWindow(panwnd);
MSACM_BroadcastNotification();
return MMSYSERR_NOERROR;
}

View file

@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
@ -27,6 +27,7 @@
#include "winnls.h"
#include "winerror.h"
#include "mmsystem.h"
#define NOBITMAP
#include "mmreg.h"
#include "msacm.h"
#include "msacmdrv.h"
@ -90,7 +91,7 @@ MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd,
MMRESULT mmr;
ACMFILTERTAGDETAILSA aftd;
TRACE("(%p, %p, %ld)\n", had, pafd, fdwDetails);
TRACE("(%p, %p, %d)\n", had, pafd, fdwDetails);
memset(&aftd, 0, sizeof(aftd));
aftd.cbStruct = sizeof(aftd);
@ -126,7 +127,7 @@ MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd,
mmr = MSACM_Message(had, ACMDM_FILTER_DETAILS, (LPARAM)pafd, fdwDetails);
break;
default:
WARN("Unknown fdwDetails %08lx\n", fdwDetails);
WARN("Unknown fdwDetails %08x\n", fdwDetails);
mmr = MMSYSERR_INVALFLAG;
break;
}
@ -136,14 +137,14 @@ MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd,
}
struct MSACM_FilterEnumWtoA_Instance {
PACMFILTERDETAILSA pafda;
DWORD dwInstance;
ACMFILTERENUMCBA fnCallback;
PACMFILTERDETAILSA pafda;
DWORD_PTR dwInstance;
ACMFILTERENUMCBA fnCallback;
};
static BOOL CALLBACK MSACM_FilterEnumCallbackWtoA(HACMDRIVERID hadid,
PACMFILTERDETAILSW pafdw,
DWORD dwInstance,
DWORD_PTR dwInstance,
DWORD fdwSupport)
{
struct MSACM_FilterEnumWtoA_Instance* pafei;
@ -164,8 +165,8 @@ static BOOL CALLBACK MSACM_FilterEnumCallbackWtoA(HACMDRIVERID hadid,
* acmFilterEnumA (MSACM32.@)
*/
MMRESULT WINAPI acmFilterEnumA(HACMDRIVER had, PACMFILTERDETAILSA pafda,
ACMFILTERENUMCBA fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFILTERENUMCBA fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
ACMFILTERDETAILSW afdw;
struct MSACM_FilterEnumWtoA_Instance afei;
@ -182,16 +183,16 @@ MMRESULT WINAPI acmFilterEnumA(HACMDRIVER had, PACMFILTERDETAILSA pafda,
afei.fnCallback = fnCallback;
return acmFilterEnumW(had, &afdw, MSACM_FilterEnumCallbackWtoA,
(DWORD)&afei, fdwEnum);
(DWORD_PTR)&afei, fdwEnum);
}
static BOOL MSACM_FilterEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had,
PACMFILTERDETAILSW pafd,
ACMFILTERENUMCBW fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFILTERENUMCBW fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
ACMFILTERTAGDETAILSW aftd;
int i, j;
unsigned int i, j;
for (i = 0; i < padid->cFilterTags; i++) {
memset(&aftd, 0, sizeof(aftd));
@ -221,13 +222,13 @@ static BOOL MSACM_FilterEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had,
* acmFilterEnumW (MSACM32.@)
*/
MMRESULT WINAPI acmFilterEnumW(HACMDRIVER had, PACMFILTERDETAILSW pafd,
ACMFILTERENUMCBW fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFILTERENUMCBW fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
PWINE_ACMDRIVERID padid;
BOOL ret;
TRACE("(%p, %p, %p, %ld, %ld)\n",
TRACE("(%p, %p, %p, %ld, %d)\n",
had, pafd, fnCallback, dwInstance, fdwEnum);
if (pafd->cbStruct < sizeof(*pafd)) return MMSYSERR_INVALPARAM;
@ -293,7 +294,7 @@ MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd
PWINE_ACMDRIVERID padid;
MMRESULT mmr;
TRACE("(%p, %p, %ld)\n", had, paftd, fdwDetails);
TRACE("(%p, %p, %d)\n", had, paftd, fdwDetails);
if (fdwDetails & ~(ACM_FILTERTAGDETAILSF_FILTERTAG|ACM_FILTERTAGDETAILSF_INDEX|
ACM_FILTERTAGDETAILSF_LARGESTSIZE))
@ -354,7 +355,7 @@ MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd
break;
default:
WARN("Unsupported fdwDetails=%08lx\n", fdwDetails);
WARN("Unsupported fdwDetails=%08x\n", fdwDetails);
mmr = MMSYSERR_ERROR;
}
@ -367,14 +368,14 @@ MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd
}
struct MSACM_FilterTagEnumWtoA_Instance {
PACMFILTERTAGDETAILSA paftda;
DWORD dwInstance;
ACMFILTERTAGENUMCBA fnCallback;
PACMFILTERTAGDETAILSA paftda;
DWORD_PTR dwInstance;
ACMFILTERTAGENUMCBA fnCallback;
};
static BOOL CALLBACK MSACM_FilterTagEnumCallbackWtoA(HACMDRIVERID hadid,
PACMFILTERTAGDETAILSW paftdw,
DWORD dwInstance,
DWORD_PTR dwInstance,
DWORD fdwSupport)
{
struct MSACM_FilterTagEnumWtoA_Instance* paftei;
@ -397,8 +398,8 @@ static BOOL CALLBACK MSACM_FilterTagEnumCallbackWtoA(HACMDRIVERID hadid,
* acmFilterTagEnumA (MSACM32.@)
*/
MMRESULT WINAPI acmFilterTagEnumA(HACMDRIVER had, PACMFILTERTAGDETAILSA paftda,
ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFILTERTAGENUMCBA fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
ACMFILTERTAGDETAILSW aftdw;
struct MSACM_FilterTagEnumWtoA_Instance aftei;
@ -413,20 +414,20 @@ MMRESULT WINAPI acmFilterTagEnumA(HACMDRIVER had, PACMFILTERTAGDETAILSA paftda,
aftei.fnCallback = fnCallback;
return acmFilterTagEnumW(had, &aftdw, MSACM_FilterTagEnumCallbackWtoA,
(DWORD)&aftei, fdwEnum);
(DWORD_PTR)&aftei, fdwEnum);
}
/***********************************************************************
* acmFilterTagEnumW (MSACM32.@)
*/
MMRESULT WINAPI acmFilterTagEnumW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFILTERTAGENUMCBW fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
PWINE_ACMDRIVERID padid;
int i;
unsigned int i;
TRACE("(%p, %p, %p, %ld, %ld)\n",
TRACE("(%p, %p, %p, %ld, %d)\n",
had, paftd, fnCallback, dwInstance, fdwEnum);
if (paftd->cbStruct < sizeof(*paftd)) return MMSYSERR_INVALPARAM;

View file

@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
@ -54,17 +54,18 @@ struct MSACM_FillFormatData {
static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
PACMFORMATTAGDETAILSA paftd,
DWORD dwInstance, DWORD fdwSupport)
DWORD_PTR dwInstance,
DWORD fdwSupport)
{
struct MSACM_FillFormatData* affd = (struct MSACM_FillFormatData*)dwInstance;
switch (affd->mode) {
case WINE_ACMFF_TAG:
if (SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_FINDSTRINGEXACT,
(WPARAM)-1, (LPARAM)paftd->szFormatTag) == CB_ERR)
CB_FINDSTRINGEXACT, -1,
(LPARAM)paftd->szFormatTag) == CB_ERR)
SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_ADDSTRING, 0, (DWORD)paftd->szFormatTag);
CB_ADDSTRING, 0, (LPARAM)paftd->szFormatTag);
break;
case WINE_ACMFF_FORMAT:
if (strcmp(affd->szFormatTag, paftd->szFormatTag) == 0) {
@ -72,7 +73,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
if (acmDriverOpen(&had, hadid, 0) == MMSYSERR_NOERROR) {
ACMFORMATDETAILSA afd;
int i, idx;
unsigned int i, len;
MMRESULT mmr;
char buffer[ACMFORMATDETAILS_FORMAT_CHARS+16];
@ -88,16 +89,15 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
afd.dwFormatIndex = i;
mmr = acmFormatDetailsA(had, &afd, ACM_FORMATDETAILSF_INDEX);
if (mmr == MMSYSERR_NOERROR) {
strncpy(buffer, afd.szFormat, ACMFORMATTAGDETAILS_FORMATTAG_CHARS);
for (idx = strlen(buffer);
idx < ACMFORMATTAGDETAILS_FORMATTAG_CHARS; idx++)
buffer[idx] = ' ';
lstrcpynA(buffer, afd.szFormat, ACMFORMATTAGDETAILS_FORMATTAG_CHARS + 1);
len = strlen(buffer);
memset(buffer+len, ' ', ACMFORMATTAGDETAILS_FORMATTAG_CHARS - len);
wsprintfA(buffer + ACMFORMATTAGDETAILS_FORMATTAG_CHARS,
"%d Ko/s",
(afd.pwfx->nAvgBytesPerSec + 512) / 1024);
SendDlgItemMessageA(affd->hWnd,
IDD_ACMFORMATCHOOSE_CMB_FORMAT,
CB_ADDSTRING, 0, (DWORD)buffer);
CB_ADDSTRING, 0, (LPARAM)buffer);
}
}
acmDriverClose(had, 0);
@ -145,7 +145,7 @@ static BOOL MSACM_FillFormatTags(HWND hWnd)
affd.hWnd = hWnd;
affd.mode = WINE_ACMFF_TAG;
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0);
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, CB_SETCURSEL, 0, 0);
return TRUE;
}
@ -166,9 +166,9 @@ static BOOL MSACM_FillFormat(HWND hWnd)
CB_GETLBTEXT,
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_GETCURSEL, 0, 0),
(DWORD)affd.szFormatTag);
(LPARAM)affd.szFormatTag);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0);
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, CB_SETCURSEL, 0, 0);
return TRUE;
}
@ -189,9 +189,9 @@ static MMRESULT MSACM_GetWFX(HWND hWnd, PACMFORMATCHOOSEA afc)
CB_GETLBTEXT,
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_GETCURSEL, 0, 0),
(DWORD)affd.szFormatTag);
(LPARAM)affd.szFormatTag);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0);
return affd.ret;
}
@ -199,7 +199,7 @@ static INT_PTR CALLBACK FormatChooseDlgProc(HWND hWnd, UINT msg,
WPARAM wParam, LPARAM lParam)
{
TRACE("hwnd=%p msg=%i 0x%08x 0x%08lx\n", hWnd, msg, wParam, lParam );
TRACE("hwnd=%p msg=%i 0x%08lx 0x%08lx\n", hWnd, msg, wParam, lParam );
switch (msg) {
case WM_INITDIALOG:
@ -208,7 +208,7 @@ static INT_PTR CALLBACK FormatChooseDlgProc(HWND hWnd, UINT msg,
MSACM_FillFormat(hWnd);
if ((afc->fdwStyle & ~(ACMFORMATCHOOSE_STYLEF_CONTEXTHELP|
ACMFORMATCHOOSE_STYLEF_SHOWHELP)) != 0)
FIXME("Unsupported style %08lx\n", ((PACMFORMATCHOOSEA)lParam)->fdwStyle);
FIXME("Unsupported style %08x\n", ((PACMFORMATCHOOSEA)lParam)->fdwStyle);
if (!(afc->fdwStyle & ACMFORMATCHOOSE_STYLEF_SHOWHELP))
ShowWindow(GetDlgItem(hWnd, IDD_ACMFORMATCHOOSE_BTN_HELP), SW_HIDE);
return TRUE;
@ -259,7 +259,7 @@ static INT_PTR CALLBACK FormatChooseDlgProc(HWND hWnd, UINT msg,
break;
#endif
default:
TRACE("Dropped dlgMsg: hwnd=%p msg=%i 0x%08x 0x%08lx\n",
TRACE("Dropped dlgMsg: hwnd=%p msg=%i 0x%08lx 0x%08lx\n",
hWnd, msg, wParam, lParam );
break;
}
@ -272,7 +272,7 @@ static INT_PTR CALLBACK FormatChooseDlgProc(HWND hWnd, UINT msg,
MMRESULT WINAPI acmFormatChooseA(PACMFORMATCHOOSEA pafmtc)
{
return DialogBoxParamA(MSACM_hInstance32, MAKEINTRESOURCEA(DLG_ACMFORMATCHOOSE_ID),
pafmtc->hwndOwner, FormatChooseDlgProc, (INT)pafmtc);
pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc);
}
/***********************************************************************
@ -321,7 +321,7 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD
static const WCHAR fmt2[] = {';',' ','%','d',' ','b','i','t','s',0};
ACMFORMATTAGDETAILSA aftd;
TRACE("(%p, %p, %ld)\n", had, pafd, fdwDetails);
TRACE("(%p, %p, %d)\n", had, pafd, fdwDetails);
memset(&aftd, 0, sizeof(aftd));
aftd.cbStruct = sizeof(aftd);
@ -356,12 +356,12 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD
mmr = MSACM_Message(had, ACMDM_FORMAT_DETAILS, (LPARAM)pafd, fdwDetails);
break;
default:
WARN("Unknown fdwDetails %08lx\n", fdwDetails);
WARN("Unknown fdwDetails %08x\n", fdwDetails);
mmr = MMSYSERR_INVALFLAG;
break;
}
if (mmr == MMSYSERR_NOERROR && pafd->szFormat[0] == (WCHAR)0) {
if (mmr == MMSYSERR_NOERROR && pafd->szFormat[0] == 0) {
wsprintfW(pafd->szFormat, fmt1, pafd->pwfx->nSamplesPerSec);
if (pafd->pwfx->wBitsPerSample) {
wsprintfW(pafd->szFormat + lstrlenW(pafd->szFormat), fmt2,
@ -377,14 +377,14 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD
}
struct MSACM_FormatEnumWtoA_Instance {
PACMFORMATDETAILSA pafda;
DWORD dwInstance;
ACMFORMATENUMCBA fnCallback;
PACMFORMATDETAILSA pafda;
DWORD_PTR dwInstance;
ACMFORMATENUMCBA fnCallback;
};
static BOOL CALLBACK MSACM_FormatEnumCallbackWtoA(HACMDRIVERID hadid,
PACMFORMATDETAILSW pafdw,
DWORD dwInstance,
DWORD_PTR dwInstance,
DWORD fdwSupport)
{
struct MSACM_FormatEnumWtoA_Instance* pafei;
@ -405,8 +405,8 @@ static BOOL CALLBACK MSACM_FormatEnumCallbackWtoA(HACMDRIVERID hadid,
* acmFormatEnumA (MSACM32.@)
*/
MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda,
ACMFORMATENUMCBA fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFORMATENUMCBA fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
ACMFORMATDETAILSW afdw;
struct MSACM_FormatEnumWtoA_Instance afei;
@ -429,7 +429,7 @@ MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda,
afei.fnCallback = fnCallback;
return acmFormatEnumW(had, &afdw, MSACM_FormatEnumCallbackWtoA,
(DWORD)&afei, fdwEnum);
(DWORD_PTR)&afei, fdwEnum);
}
/***********************************************************************
@ -437,47 +437,91 @@ MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda,
*/
static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had,
PACMFORMATDETAILSW pafd, PWAVEFORMATEX pwfxRef,
ACMFORMATENUMCBW fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFORMATENUMCBW fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
ACMFORMATTAGDETAILSW aftd;
int i, j;
unsigned int i, j;
for (i = 0; i < padid->cFormatTags; i++) {
memset(&aftd, 0, sizeof(aftd));
aftd.cbStruct = sizeof(aftd);
aftd.dwFormatTagIndex = i;
if (acmFormatTagDetailsW(had, &aftd, ACM_FORMATTAGDETAILSF_INDEX) != MMSYSERR_NOERROR)
continue;
if (fdwEnum & ACM_FORMATENUMF_SUGGEST) {
HDRVR hdrvr;
ACMDRVFORMATSUGGEST adfs;
pafd->dwFormatIndex = 0;
memset(&aftd, 0, sizeof(aftd));
aftd.cbStruct = sizeof(aftd);
memset(&adfs, 0, sizeof(adfs));
adfs.cbStruct = sizeof(adfs);
if ((fdwEnum & ACM_FORMATENUMF_WFORMATTAG) && aftd.dwFormatTag != pwfxRef->wFormatTag)
continue;
for (i = 0; i < padid->cFormatTags; i++) {
aftd.dwFormatTag = i;
pafd->dwFormatTag = aftd.dwFormatTag;
pafd->pwfx->wFormatTag = pafd->dwFormatTag;
for (j = 0; j < aftd.cStandardFormats; j++) {
pafd->dwFormatIndex = j;
pafd->dwFormatTag = aftd.dwFormatTag;
if (acmFormatDetailsW(had, pafd, ACM_FORMATDETAILSF_INDEX) != MMSYSERR_NOERROR)
continue;
if (acmFormatTagDetailsW(had, &aftd, ACM_FORMATTAGDETAILSF_INDEX) != MMSYSERR_NOERROR)
continue;
if ((fdwEnum & ACM_FORMATENUMF_NCHANNELS) &&
pafd->pwfx->nChannels != pwfxRef->nChannels)
continue;
if ((fdwEnum & ACM_FORMATENUMF_NSAMPLESPERSEC) &&
pafd->pwfx->nSamplesPerSec != pwfxRef->nSamplesPerSec)
continue;
if ((fdwEnum & ACM_FORMATENUMF_WBITSPERSAMPLE) &&
pafd->pwfx->wBitsPerSample != pwfxRef->wBitsPerSample)
continue;
if ((fdwEnum & ACM_FORMATENUMF_HARDWARE) &&
!(pafd->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_HARDWARE))
continue;
adfs.cbwfxSrc = aftd.cbFormatSize;
adfs.cbwfxDst = aftd.cbFormatSize;
adfs.pwfxSrc = pwfxRef;
adfs.pwfxDst = pafd->pwfx;
pafd->fdwSupport = padid->fdwSupport;
/* more checks to be done on fdwEnum */
if ((fdwEnum & ACM_FORMATENUMF_WFORMATTAG) &&
aftd.dwFormatTag != pwfxRef->wFormatTag)
continue;
if (!(fnCallback)((HACMDRIVERID)padid, pafd, dwInstance, padid->fdwSupport))
return FALSE;
}
/* the "formats" used by the filters are also reported */
if ((fdwEnum & ACM_FORMATENUMF_HARDWARE) &&
!(pafd->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_HARDWARE))
continue;
hdrvr = OpenDriver(padid->pszFileName,0,0);
SendDriverMessage(hdrvr,ACMDM_FORMAT_SUGGEST,(LPARAM)&adfs,(fdwEnum & 0x000000FFL));
if (acmFormatDetailsW(had, pafd, ACM_FORMATDETAILSF_FORMAT) != MMSYSERR_NOERROR)
continue;
pafd->cbwfx = sizeof(*(pafd->pwfx));
if (!(fnCallback)((HACMDRIVERID)padid, pafd, dwInstance, padid->fdwSupport))
return FALSE;
}
} else {
for (i = 0; i < padid->cFormatTags; i++) {
memset(&aftd, 0, sizeof(aftd));
aftd.cbStruct = sizeof(aftd);
aftd.dwFormatTagIndex = i;
if (acmFormatTagDetailsW(had, &aftd, ACM_FORMATTAGDETAILSF_INDEX) != MMSYSERR_NOERROR)
continue;
if ((fdwEnum & ACM_FORMATENUMF_WFORMATTAG) && aftd.dwFormatTag != pwfxRef->wFormatTag)
continue;
for (j = 0; j < aftd.cStandardFormats; j++) {
pafd->dwFormatIndex = j;
pafd->dwFormatTag = aftd.dwFormatTag;
if (acmFormatDetailsW(had, pafd, ACM_FORMATDETAILSF_INDEX) != MMSYSERR_NOERROR)
continue;
if ((fdwEnum & ACM_FORMATENUMF_NCHANNELS) &&
pafd->pwfx->nChannels != pwfxRef->nChannels)
continue;
if ((fdwEnum & ACM_FORMATENUMF_NSAMPLESPERSEC) &&
pafd->pwfx->nSamplesPerSec != pwfxRef->nSamplesPerSec)
continue;
if ((fdwEnum & ACM_FORMATENUMF_WBITSPERSAMPLE) &&
pafd->pwfx->wBitsPerSample != pwfxRef->wBitsPerSample)
continue;
if ((fdwEnum & ACM_FORMATENUMF_HARDWARE) &&
!(pafd->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_HARDWARE))
continue;
/* more checks to be done on fdwEnum */
if (!(fnCallback)((HACMDRIVERID)padid, pafd, dwInstance, padid->fdwSupport))
return FALSE;
}
/* the "formats" used by the filters are also reported */
}
}
return TRUE;
}
@ -485,14 +529,14 @@ static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had,
/**********************************************************************/
MMRESULT WINAPI acmFormatEnumW(HACMDRIVER had, PACMFORMATDETAILSW pafd,
ACMFORMATENUMCBW fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFORMATENUMCBW fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
PWINE_ACMDRIVERID padid;
WAVEFORMATEX wfxRef;
BOOL ret;
TRACE("(%p, %p, %p, %ld, %ld)\n",
TRACE("(%p, %p, %p, %ld, %d)\n",
had, pafd, fnCallback, dwInstance, fdwEnum);
if (!pafd)
@ -514,9 +558,8 @@ MMRESULT WINAPI acmFormatEnumW(HACMDRIVER had, PACMFORMATDETAILSW pafd,
(pafd->dwFormatTag != pafd->pwfx->wFormatTag))
return MMSYSERR_INVALPARAM;
if (fdwEnum & (ACM_FORMATENUMF_CONVERT|ACM_FORMATENUMF_SUGGEST|
ACM_FORMATENUMF_INPUT|ACM_FORMATENUMF_OUTPUT))
FIXME("Unsupported fdwEnum values %08lx\n", fdwEnum);
if (fdwEnum & (ACM_FORMATENUMF_CONVERT|ACM_FORMATENUMF_INPUT|ACM_FORMATENUMF_OUTPUT))
FIXME("Unsupported fdwEnum values %08x\n", fdwEnum);
if (had) {
HACMDRIVERID hadid;
@ -549,7 +592,7 @@ MMRESULT WINAPI acmFormatSuggest(HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
ACMDRVFORMATSUGGEST adfg;
MMRESULT mmr;
TRACE("(%p, %p, %p, %ld, %ld)\n",
TRACE("(%p, %p, %p, %d, %d)\n",
had, pwfxSrc, pwfxDst, cbwfxDst, fdwSuggest);
if (fdwSuggest & ~(ACM_FORMATSUGGESTF_NCHANNELS|ACM_FORMATSUGGESTF_NSAMPLESPERSEC|
@ -625,7 +668,7 @@ MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd
PWINE_ACMDRIVERID padid;
MMRESULT mmr = ACMERR_NOTPOSSIBLE;
TRACE("(%p, %p, %ld)\n", had, paftd, fdwDetails);
TRACE("(%p, %p, %d)\n", had, paftd, fdwDetails);
if (fdwDetails & ~(ACM_FORMATTAGDETAILSF_FORMATTAG|ACM_FORMATTAGDETAILSF_INDEX|
ACM_FORMATTAGDETAILSF_LARGESTSIZE))
@ -692,7 +735,7 @@ MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd
break;
default:
WARN("Unsupported fdwDetails=%08lx\n", fdwDetails);
WARN("Unsupported fdwDetails=%08x\n", fdwDetails);
mmr = MMSYSERR_ERROR;
}
@ -705,14 +748,14 @@ MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd
}
struct MSACM_FormatTagEnumWtoA_Instance {
PACMFORMATTAGDETAILSA paftda;
DWORD dwInstance;
ACMFORMATTAGENUMCBA fnCallback;
PACMFORMATTAGDETAILSA paftda;
DWORD_PTR dwInstance;
ACMFORMATTAGENUMCBA fnCallback;
};
static BOOL CALLBACK MSACM_FormatTagEnumCallbackWtoA(HACMDRIVERID hadid,
PACMFORMATTAGDETAILSW paftdw,
DWORD dwInstance,
DWORD_PTR dwInstance,
DWORD fdwSupport)
{
struct MSACM_FormatTagEnumWtoA_Instance* paftei;
@ -735,8 +778,8 @@ static BOOL CALLBACK MSACM_FormatTagEnumCallbackWtoA(HACMDRIVERID hadid,
* acmFormatTagEnumA (MSACM32.@)
*/
MMRESULT WINAPI acmFormatTagEnumA(HACMDRIVER had, PACMFORMATTAGDETAILSA paftda,
ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFORMATTAGENUMCBA fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
ACMFORMATTAGDETAILSW aftdw;
struct MSACM_FormatTagEnumWtoA_Instance aftei;
@ -760,21 +803,21 @@ MMRESULT WINAPI acmFormatTagEnumA(HACMDRIVER had, PACMFORMATTAGDETAILSA paftda,
aftei.fnCallback = fnCallback;
return acmFormatTagEnumW(had, &aftdw, MSACM_FormatTagEnumCallbackWtoA,
(DWORD)&aftei, fdwEnum);
(DWORD_PTR)&aftei, fdwEnum);
}
/***********************************************************************
* acmFormatTagEnumW (MSACM32.@)
*/
MMRESULT WINAPI acmFormatTagEnumW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFORMATTAGENUMCBW fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
PWINE_ACMDRIVERID padid;
int i;
unsigned int i;
BOOL bPcmDone = FALSE;
TRACE("(%p, %p, %p, %ld, %ld)\n",
TRACE("(%p, %p, %p, %ld, %d)\n",
had, paftd, fnCallback, dwInstance, fdwEnum);
if (!paftd)
@ -789,8 +832,8 @@ MMRESULT WINAPI acmFormatTagEnumW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
/* (WS) MSDN info page says that if had != 0, then we should find
* the specific driver to get its tags from. Therefore I'm removing
* the FIXME call and adding a search block below. It also seems
* that the lack of this functionality was the responsible for
* codecs to be multiply and incorrectly listed.
* that the lack of this functionality was the responsible for
* codecs to be multiply and incorrectly listed.
*/
/* if (had) FIXME("had != NULL, not supported\n"); */
@ -815,7 +858,7 @@ MMRESULT WINAPI acmFormatTagEnumW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
if (bPcmDone) continue;
bPcmDone = TRUE;
}
if (!(fnCallback)((HACMDRIVERID)padid, paftd, dwInstance, padid->fdwSupport))
if (!(fnCallback)((HACMDRIVERID)padid, paftd, dwInstance, padid->fdwSupport))
return MMSYSERR_NOERROR;
}
}

View file

@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
@ -44,7 +44,51 @@ WINE_DEFAULT_DEBUG_CHANNEL(msacm);
HANDLE MSACM_hHeap = NULL;
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID = NULL;
PWINE_ACMDRIVERID MSACM_pLastACMDriverID = NULL;
static PWINE_ACMDRIVERID MSACM_pLastACMDriverID;
static DWORD MSACM_suspendBroadcastCount = 0;
static BOOL MSACM_pendingBroadcast = FALSE;
static PWINE_ACMNOTIFYWND MSACM_pFirstACMNotifyWnd = NULL;
static PWINE_ACMNOTIFYWND MSACM_pLastACMNotifyWnd = NULL;
static void MSACM_ReorderDriversByPriority(void);
/***********************************************************************
* MSACM_RegisterDriverFromRegistry()
*/
PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry)
{
static const WCHAR msacmW[] = {'M','S','A','C','M','.'};
static const WCHAR drvkey[] = {'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'W','i','n','d','o','w','s',' ','N','T','\\',
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
'D','r','i','v','e','r','s','3','2','\0'};
WCHAR buf[2048];
DWORD bufLen, lRet;
HKEY hKey;
PWINE_ACMDRIVERID padid = NULL;
/* The requested registry entry must have the format msacm.XXXXX in order to
be recognized in any future sessions of msacm
*/
if (0 == strncmpiW(pszRegEntry, msacmW, sizeof(msacmW)/sizeof(WCHAR))) {
lRet = RegOpenKeyExW(HKEY_LOCAL_MACHINE, drvkey, 0, KEY_QUERY_VALUE, &hKey);
if (lRet != ERROR_SUCCESS) {
WARN("unable to open registry key - 0x%08x\n", lRet);
} else {
bufLen = sizeof(buf);
lRet = RegQueryValueExW(hKey, pszRegEntry, NULL, NULL, (LPBYTE)buf, &bufLen);
if (lRet != ERROR_SUCCESS) {
WARN("unable to query requested subkey %s - 0x%08x\n", debugstr_w(pszRegEntry), lRet);
} else {
MSACM_RegisterDriver(pszRegEntry, buf, 0);
}
RegCloseKey( hKey );
}
}
return padid;
}
#if 0
/***********************************************************************
@ -69,7 +113,7 @@ static void MSACM_DumpCache(PWINE_ACMDRIVERID padid)
* Returns TRUE is the format tag fmtTag is present in the cache.
* If so, idx is set to its index.
*/
BOOL MSACM_FindFormatTagInCache(WINE_ACMDRIVERID* padid, DWORD fmtTag, LPDWORD idx)
BOOL MSACM_FindFormatTagInCache(const WINE_ACMDRIVERID* padid, DWORD fmtTag, LPDWORD idx)
{
unsigned i;
@ -88,7 +132,7 @@ BOOL MSACM_FindFormatTagInCache(WINE_ACMDRIVERID* padid, DWORD fmtTag, LPDWORD i
static BOOL MSACM_FillCache(PWINE_ACMDRIVERID padid)
{
HACMDRIVER had = 0;
int ntag;
unsigned int ntag;
ACMDRIVERDETAILSW add;
ACMFORMATTAGDETAILSW aftd;
@ -205,7 +249,7 @@ static BOOL MSACM_ReadCache(PWINE_ACMDRIVERID padid)
/***********************************************************************
* MSACM_WriteCache
*/
static BOOL MSACM_WriteCache(PWINE_ACMDRIVERID padid)
static BOOL MSACM_WriteCache(const WINE_ACMDRIVERID *padid)
{
LPWSTR key = MSACM_GetRegistryKey(padid);
HKEY hKey;
@ -215,11 +259,11 @@ static BOOL MSACM_WriteCache(PWINE_ACMDRIVERID padid)
if (RegCreateKeyW(HKEY_LOCAL_MACHINE, key, &hKey))
goto errCleanUp;
if (RegSetValueExA(hKey, "cFormatTags", 0, REG_DWORD, (void*)&padid->cFormatTags, sizeof(DWORD)))
if (RegSetValueExA(hKey, "cFormatTags", 0, REG_DWORD, (const void*)&padid->cFormatTags, sizeof(DWORD)))
goto errCleanUp;
if (RegSetValueExA(hKey, "cFilterTags", 0, REG_DWORD, (void*)&padid->cFilterTags, sizeof(DWORD)))
if (RegSetValueExA(hKey, "cFilterTags", 0, REG_DWORD, (const void*)&padid->cFilterTags, sizeof(DWORD)))
goto errCleanUp;
if (RegSetValueExA(hKey, "fdwSupport", 0, REG_DWORD, (void*)&padid->fdwSupport, sizeof(DWORD)))
if (RegSetValueExA(hKey, "fdwSupport", 0, REG_DWORD, (const void*)&padid->fdwSupport, sizeof(DWORD)))
goto errCleanUp;
if (RegSetValueExA(hKey, "aFormatTagCache", 0, REG_BINARY,
(void*)padid->aFormatTag,
@ -237,44 +281,68 @@ static BOOL MSACM_WriteCache(PWINE_ACMDRIVERID padid)
* MSACM_RegisterDriver()
*/
PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName,
HINSTANCE hinstModule)
PWINE_ACMLOCALDRIVER pLocalDriver)
{
PWINE_ACMDRIVERID padid;
TRACE("(%s, %s, %p)\n",
debugstr_w(pszDriverAlias), debugstr_w(pszFileName), hinstModule);
TRACE("(%s, %s, %p)\n",
debugstr_w(pszDriverAlias), debugstr_w(pszFileName), pLocalDriver);
padid = (PWINE_ACMDRIVERID) HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVERID));
padid = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVERID));
if (!padid)
return NULL;
padid->obj.dwType = WINE_ACMOBJ_DRIVERID;
padid->obj.pACMDriverID = padid;
padid->pszDriverAlias = NULL;
if (pszDriverAlias)
{
padid->pszDriverAlias = HeapAlloc( MSACM_hHeap, 0, (strlenW(pszDriverAlias)+1) * sizeof(WCHAR) );
if (!padid->pszDriverAlias) {
HeapFree(MSACM_hHeap, 0, padid);
return NULL;
}
strcpyW( padid->pszDriverAlias, pszDriverAlias );
}
padid->pszFileName = NULL;
if (pszFileName)
{
padid->pszFileName = HeapAlloc( MSACM_hHeap, 0, (strlenW(pszFileName)+1) * sizeof(WCHAR) );
if (!padid->pszFileName) {
HeapFree(MSACM_hHeap, 0, padid->pszDriverAlias);
HeapFree(MSACM_hHeap, 0, padid);
return NULL;
}
strcpyW( padid->pszFileName, pszFileName );
}
padid->hInstModule = hinstModule;
padid->pLocalDriver = pLocalDriver;
padid->pACMDriverList = NULL;
padid->pNextACMDriverID = NULL;
padid->pPrevACMDriverID = MSACM_pLastACMDriverID;
if (MSACM_pLastACMDriverID)
MSACM_pLastACMDriverID->pNextACMDriverID = padid;
MSACM_pLastACMDriverID = padid;
if (!MSACM_pFirstACMDriverID)
MSACM_pFirstACMDriverID = padid;
if (pLocalDriver) {
padid->pPrevACMDriverID = NULL;
padid->pNextACMDriverID = MSACM_pFirstACMDriverID;
if (MSACM_pFirstACMDriverID)
MSACM_pFirstACMDriverID->pPrevACMDriverID = padid;
MSACM_pFirstACMDriverID = padid;
if (!MSACM_pLastACMDriverID)
MSACM_pLastACMDriverID = padid;
} else {
padid->pNextACMDriverID = NULL;
padid->pPrevACMDriverID = MSACM_pLastACMDriverID;
if (MSACM_pLastACMDriverID)
MSACM_pLastACMDriverID->pNextACMDriverID = padid;
MSACM_pLastACMDriverID = padid;
if (!MSACM_pFirstACMDriverID)
MSACM_pFirstACMDriverID = padid;
}
/* disable the driver if we cannot load the cache */
if (!MSACM_ReadCache(padid) && !MSACM_FillCache(padid)) {
if ((!padid->pszDriverAlias || !MSACM_ReadCache(padid)) && !MSACM_FillCache(padid)) {
WARN("Couldn't load cache for ACM driver (%s)\n", debugstr_w(pszFileName));
MSACM_UnregisterDriver(padid);
return NULL;
}
if (pLocalDriver) padid->fdwSupport |= ACMDRIVERDETAILS_SUPPORTF_LOCAL;
return padid;
}
@ -327,10 +395,362 @@ void MSACM_RegisterAllDrivers(void)
*name = '=';
}
}
MSACM_ReorderDriversByPriority();
MSACM_RegisterDriver(msacm32, msacm32, 0);
}
/***********************************************************************
* MSACM_RegisterNotificationWindow()
*/
PWINE_ACMNOTIFYWND MSACM_RegisterNotificationWindow(HWND hNotifyWnd, DWORD dwNotifyMsg)
{
PWINE_ACMNOTIFYWND panwnd;
TRACE("(%p,0x%08x)\n", hNotifyWnd, dwNotifyMsg);
panwnd = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMNOTIFYWND));
panwnd->obj.dwType = WINE_ACMOBJ_NOTIFYWND;
panwnd->obj.pACMDriverID = 0;
panwnd->hNotifyWnd = hNotifyWnd;
panwnd->dwNotifyMsg = dwNotifyMsg;
panwnd->fdwSupport = 0;
panwnd->pNextACMNotifyWnd = NULL;
panwnd->pPrevACMNotifyWnd = MSACM_pLastACMNotifyWnd;
if (MSACM_pLastACMNotifyWnd)
MSACM_pLastACMNotifyWnd->pNextACMNotifyWnd = panwnd;
MSACM_pLastACMNotifyWnd = panwnd;
if (!MSACM_pFirstACMNotifyWnd)
MSACM_pFirstACMNotifyWnd = panwnd;
return panwnd;
}
/***********************************************************************
* MSACM_BroadcastNotification()
*/
void MSACM_BroadcastNotification(void)
{
if (MSACM_suspendBroadcastCount <= 0) {
PWINE_ACMNOTIFYWND panwnd;
for (panwnd = MSACM_pFirstACMNotifyWnd; panwnd; panwnd = panwnd->pNextACMNotifyWnd)
if (!(panwnd->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED))
SendMessageW(panwnd->hNotifyWnd, panwnd->dwNotifyMsg, 0, 0);
} else {
MSACM_pendingBroadcast = TRUE;
}
}
/***********************************************************************
* MSACM_DisableNotifications()
*/
void MSACM_DisableNotifications(void)
{
MSACM_suspendBroadcastCount++;
}
/***********************************************************************
* MSACM_EnableNotifications()
*/
void MSACM_EnableNotifications(void)
{
if (MSACM_suspendBroadcastCount > 0) {
MSACM_suspendBroadcastCount--;
if (MSACM_suspendBroadcastCount == 0 && MSACM_pendingBroadcast) {
MSACM_pendingBroadcast = FALSE;
MSACM_BroadcastNotification();
}
}
}
/***********************************************************************
* MSACM_UnRegisterNotificationWindow()
*/
PWINE_ACMNOTIFYWND MSACM_UnRegisterNotificationWindow(const WINE_ACMNOTIFYWND *panwnd)
{
PWINE_ACMNOTIFYWND p;
for (p = MSACM_pFirstACMNotifyWnd; p; p = p->pNextACMNotifyWnd) {
if (p == panwnd) {
PWINE_ACMNOTIFYWND pNext = p->pNextACMNotifyWnd;
if (p->pPrevACMNotifyWnd) p->pPrevACMNotifyWnd->pNextACMNotifyWnd = p->pNextACMNotifyWnd;
if (p->pNextACMNotifyWnd) p->pNextACMNotifyWnd->pPrevACMNotifyWnd = p->pPrevACMNotifyWnd;
if (MSACM_pFirstACMNotifyWnd == p) MSACM_pFirstACMNotifyWnd = p->pNextACMNotifyWnd;
if (MSACM_pLastACMNotifyWnd == p) MSACM_pLastACMNotifyWnd = p->pPrevACMNotifyWnd;
HeapFree(MSACM_hHeap, 0, p);
return pNext;
}
}
return NULL;
}
/***********************************************************************
* MSACM_RePositionDriver()
*/
void MSACM_RePositionDriver(PWINE_ACMDRIVERID padid, DWORD dwPriority)
{
PWINE_ACMDRIVERID pTargetPosition = NULL;
/* Remove selected driver from linked list */
if (MSACM_pFirstACMDriverID == padid) {
MSACM_pFirstACMDriverID = padid->pNextACMDriverID;
}
if (MSACM_pLastACMDriverID == padid) {
MSACM_pLastACMDriverID = padid->pPrevACMDriverID;
}
if (padid->pPrevACMDriverID != NULL) {
padid->pPrevACMDriverID->pNextACMDriverID = padid->pNextACMDriverID;
}
if (padid->pNextACMDriverID != NULL) {
padid->pNextACMDriverID->pPrevACMDriverID = padid->pPrevACMDriverID;
}
/* Look up position where selected driver should be */
if (dwPriority == 1) {
pTargetPosition = padid->pPrevACMDriverID;
while (pTargetPosition->pPrevACMDriverID != NULL &&
!(pTargetPosition->pPrevACMDriverID->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_LOCAL)) {
pTargetPosition = pTargetPosition->pPrevACMDriverID;
}
} else if (dwPriority == -1) {
pTargetPosition = padid->pNextACMDriverID;
while (pTargetPosition->pNextACMDriverID != NULL) {
pTargetPosition = pTargetPosition->pNextACMDriverID;
}
}
/* Place selected driver in selected position */
padid->pPrevACMDriverID = pTargetPosition->pPrevACMDriverID;
padid->pNextACMDriverID = pTargetPosition;
if (padid->pPrevACMDriverID != NULL) {
padid->pPrevACMDriverID->pNextACMDriverID = padid;
} else {
MSACM_pFirstACMDriverID = padid;
}
if (padid->pNextACMDriverID != NULL) {
padid->pNextACMDriverID->pPrevACMDriverID = padid;
} else {
MSACM_pLastACMDriverID = padid;
}
}
/***********************************************************************
* MSACM_ReorderDriversByPriority()
* Reorders all drivers based on the priority list indicated by the registry key:
* HKCU\\Software\\Microsoft\\Multimedia\\Audio Compression Manager\\Priority v4.00
*/
static void MSACM_ReorderDriversByPriority(void)
{
PWINE_ACMDRIVERID padid;
unsigned int iNumDrivers;
PWINE_ACMDRIVERID * driverList = NULL;
HKEY hPriorityKey = NULL;
TRACE("\n");
/* Count drivers && alloc corresponding memory for list */
iNumDrivers = 0;
for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) iNumDrivers++;
if (iNumDrivers > 1)
{
LONG lError;
static const WCHAR basePriorityKey[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'M','u','l','t','i','m','e','d','i','a','\\',
'A','u','d','i','o',' ','C','o','m','p','r','e','s','s','i','o','n',' ','M','a','n','a','g','e','r','\\',
'P','r','i','o','r','i','t','y',' ','v','4','.','0','0','\0'
};
unsigned int i;
LONG lBufferLength;
WCHAR szBuffer[256];
driverList = HeapAlloc(MSACM_hHeap, 0, iNumDrivers * sizeof(PWINE_ACMDRIVERID));
if (!driverList)
{
ERR("out of memory\n");
goto errCleanUp;
}
lError = RegOpenKeyW(HKEY_CURRENT_USER, basePriorityKey, &hPriorityKey);
if (lError != ERROR_SUCCESS) {
TRACE("RegOpenKeyW failed, possibly key does not exist yet\n");
hPriorityKey = NULL;
goto errCleanUp;
}
/* Copy drivers into list to simplify linked list modification */
for (i = 0, padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID, i++)
{
driverList[i] = padid;
}
/* Query each of the priorities in turn. Alias key is in lowercase.
The general form of the priority record is the following:
"PriorityN" --> "1, msacm.driveralias"
where N is an integer, and the value is a string of the driver
alias, prefixed by "1, " for an enabled driver, or "0, " for a
disabled driver.
*/
for (i = 0; i < iNumDrivers; i++)
{
static const WCHAR priorityTmpl[] = {'P','r','i','o','r','i','t','y','%','l','d','\0'};
WCHAR szSubKey[17];
unsigned int iTargetPosition;
unsigned int iCurrentPosition;
WCHAR * pAlias;
static const WCHAR sPrefix[] = {'m','s','a','c','m','.','\0'};
/* Build expected entry name */
snprintfW(szSubKey, 17, priorityTmpl, i + 1);
lBufferLength = sizeof(szBuffer);
lError = RegQueryValueExW(hPriorityKey, szSubKey, NULL, NULL, (LPBYTE)szBuffer, (LPDWORD)&lBufferLength);
if (lError != ERROR_SUCCESS) continue;
/* Recovered driver alias should be at this position */
iTargetPosition = i;
/* Locate driver alias in driver list */
pAlias = strstrW(szBuffer, sPrefix);
if (pAlias == NULL) continue;
for (iCurrentPosition = 0; iCurrentPosition < iNumDrivers; iCurrentPosition++) {
if (strcmpiW(driverList[iCurrentPosition]->pszDriverAlias, pAlias) == 0)
break;
}
if (iCurrentPosition < iNumDrivers && iTargetPosition != iCurrentPosition) {
padid = driverList[iTargetPosition];
driverList[iTargetPosition] = driverList[iCurrentPosition];
driverList[iCurrentPosition] = padid;
/* Locate enabled status */
if (szBuffer[0] == '1') {
driverList[iTargetPosition]->fdwSupport &= ~ACMDRIVERDETAILS_SUPPORTF_DISABLED;
} else if (szBuffer[0] == '0') {
driverList[iTargetPosition]->fdwSupport |= ACMDRIVERDETAILS_SUPPORTF_DISABLED;
}
}
}
/* Re-assign pointers so that linked list traverses the ordered array */
for (i = 0; i < iNumDrivers; i++) {
driverList[i]->pPrevACMDriverID = (i > 0) ? driverList[i - 1] : NULL;
driverList[i]->pNextACMDriverID = (i < iNumDrivers - 1) ? driverList[i + 1] : NULL;
}
MSACM_pFirstACMDriverID = driverList[0];
MSACM_pLastACMDriverID = driverList[iNumDrivers - 1];
}
errCleanUp:
if (hPriorityKey != NULL) RegCloseKey(hPriorityKey);
HeapFree(MSACM_hHeap, 0, driverList);
}
/***********************************************************************
* MSACM_WriteCurrentPriorities()
* Writes out current order of driver priorities to registry key:
* HKCU\\Software\\Microsoft\\Multimedia\\Audio Compression Manager\\Priority v4.00
*/
void MSACM_WriteCurrentPriorities(void)
{
LONG lError;
HKEY hPriorityKey;
static const WCHAR basePriorityKey[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'M','u','l','t','i','m','e','d','i','a','\\',
'A','u','d','i','o',' ','C','o','m','p','r','e','s','s','i','o','n',' ','M','a','n','a','g','e','r','\\',
'P','r','i','o','r','i','t','y',' ','v','4','.','0','0','\0'
};
PWINE_ACMDRIVERID padid;
DWORD dwPriorityCounter;
static const WCHAR priorityTmpl[] = {'P','r','i','o','r','i','t','y','%','l','d','\0'};
static const WCHAR valueTmpl[] = {'%','c',',',' ','%','s','\0'};
static const WCHAR converterAlias[] = {'I','n','t','e','r','n','a','l',' ','P','C','M',' ','C','o','n','v','e','r','t','e','r','\0'};
WCHAR szSubKey[17];
WCHAR szBuffer[256];
/* Delete ACM priority key and create it anew */
lError = RegDeleteKeyW(HKEY_CURRENT_USER, basePriorityKey);
if (lError != ERROR_SUCCESS && lError != ERROR_FILE_NOT_FOUND) {
ERR("unable to remove current key %s (0x%08x) - priority changes won't persist past application end.\n",
debugstr_w(basePriorityKey), lError);
return;
}
lError = RegCreateKeyW(HKEY_CURRENT_USER, basePriorityKey, &hPriorityKey);
if (lError != ERROR_SUCCESS) {
ERR("unable to create key %s (0x%08x) - priority changes won't persist past application end.\n",
debugstr_w(basePriorityKey), lError);
return;
}
/* Write current list of priorities */
for (dwPriorityCounter = 0, padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
if (padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_LOCAL) continue;
if (padid->pszDriverAlias == NULL) continue; /* internal PCM converter is last */
/* Build required value name */
dwPriorityCounter++;
snprintfW(szSubKey, 17, priorityTmpl, dwPriorityCounter);
/* Value has a 1 in front for enabled drivers and 0 for disabled drivers */
snprintfW(szBuffer, 256, valueTmpl, (padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) ? '0' : '1', padid->pszDriverAlias);
strlwrW(szBuffer);
lError = RegSetValueExW(hPriorityKey, szSubKey, 0, REG_SZ, (BYTE *)szBuffer, (strlenW(szBuffer) + 1) * sizeof(WCHAR));
if (lError != ERROR_SUCCESS) {
ERR("unable to write value for %s under key %s (0x%08x)\n",
debugstr_w(padid->pszDriverAlias), debugstr_w(basePriorityKey), lError);
}
}
/* Build required value name */
dwPriorityCounter++;
snprintfW(szSubKey, 17, priorityTmpl, dwPriorityCounter);
/* Value has a 1 in front for enabled drivers and 0 for disabled drivers */
snprintfW(szBuffer, 256, valueTmpl, '1', converterAlias);
lError = RegSetValueExW(hPriorityKey, szSubKey, 0, REG_SZ, (BYTE *)szBuffer, (strlenW(szBuffer) + 1) * sizeof(WCHAR));
if (lError != ERROR_SUCCESS) {
ERR("unable to write value for %s under key %s (0x%08x)\n",
debugstr_w(converterAlias), debugstr_w(basePriorityKey), lError);
}
RegCloseKey(hPriorityKey);
}
static PWINE_ACMLOCALDRIVER MSACM_pFirstACMLocalDriver;
static PWINE_ACMLOCALDRIVER MSACM_pLastACMLocalDriver;
static PWINE_ACMLOCALDRIVER MSACM_UnregisterLocalDriver(PWINE_ACMLOCALDRIVER paldrv)
{
PWINE_ACMLOCALDRIVER pNextACMLocalDriver;
if (paldrv->pACMInstList) {
ERR("local driver instances still present after closing all drivers - memory leak\n");
return NULL;
}
if (paldrv == MSACM_pFirstACMLocalDriver)
MSACM_pFirstACMLocalDriver = paldrv->pNextACMLocalDrv;
if (paldrv == MSACM_pLastACMLocalDriver)
MSACM_pLastACMLocalDriver = paldrv->pPrevACMLocalDrv;
if (paldrv->pPrevACMLocalDrv)
paldrv->pPrevACMLocalDrv->pNextACMLocalDrv = paldrv->pNextACMLocalDrv;
if (paldrv->pNextACMLocalDrv)
paldrv->pNextACMLocalDrv->pPrevACMLocalDrv = paldrv->pPrevACMLocalDrv;
pNextACMLocalDriver = paldrv->pNextACMLocalDrv;
HeapFree(MSACM_hHeap, 0, paldrv);
return pNextACMLocalDriver;
}
/***********************************************************************
* MSACM_UnregisterDriver()
*/
@ -341,10 +761,8 @@ PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
while (p->pACMDriverList)
acmDriverClose((HACMDRIVER) p->pACMDriverList, 0);
if (p->pszDriverAlias)
HeapFree(MSACM_hHeap, 0, p->pszDriverAlias);
if (p->pszFileName)
HeapFree(MSACM_hHeap, 0, p->pszFileName);
HeapFree(MSACM_hHeap, 0, p->pszDriverAlias);
HeapFree(MSACM_hHeap, 0, p->pszFileName);
HeapFree(MSACM_hHeap, 0, p->aFormatTag);
if (p == MSACM_pFirstACMDriverID)
@ -359,6 +777,7 @@ PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
pNextACMDriverID = p->pNextACMDriverID;
if (p->pLocalDriver) MSACM_UnregisterLocalDriver(p->pLocalDriver);
HeapFree(MSACM_hHeap, 0, p);
return pNextACMDriverID;
@ -369,12 +788,17 @@ PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
*/
void MSACM_UnregisterAllDrivers(void)
{
PWINE_ACMNOTIFYWND panwnd = MSACM_pFirstACMNotifyWnd;
PWINE_ACMDRIVERID p = MSACM_pFirstACMDriverID;
while (p) {
MSACM_WriteCache(p);
p = MSACM_UnregisterDriver(p);
}
while (panwnd) {
panwnd = MSACM_UnRegisterNotificationWindow(panwnd);
}
}
/***********************************************************************
@ -406,6 +830,26 @@ PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver)
return (PWINE_ACMDRIVER)MSACM_GetObj((HACMOBJ)hDriver, WINE_ACMOBJ_DRIVER);
}
/***********************************************************************
* MSACM_GetNotifyWnd()
*/
PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver)
{
return (PWINE_ACMNOTIFYWND)MSACM_GetObj((HACMOBJ)hDriver, WINE_ACMOBJ_NOTIFYWND);
}
/***********************************************************************
* MSACM_GetLocalDriver()
*/
/*
PWINE_ACMLOCALDRIVER MSACM_GetLocalDriver(HACMDRIVER hDriver)
{
return (PWINE_ACMLOCALDRIVER)MSACM_GetObj((HACMOBJ)hDriver, WINE_ACMOBJ_LOCALDRIVER);
}
*/
#define MSACM_DRIVER_SendMessage(PDRVRINST, msg, lParam1, lParam2) \
(PDRVRINST)->pLocalDriver->lpDrvProc((PDRVRINST)->dwDriverID, (HDRVR)(PDRVRINST), msg, lParam1, lParam2)
/***********************************************************************
* MSACM_Message()
*/
@ -413,5 +857,223 @@ 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;
if (!pad) return MMSYSERR_INVALHANDLE;
if (pad->hDrvr) return SendDriverMessage(pad->hDrvr, uMsg, lParam1, lParam2);
if (pad->pLocalDrvrInst) return MSACM_DRIVER_SendMessage(pad->pLocalDrvrInst, uMsg, lParam1, lParam2);
return MMSYSERR_INVALHANDLE;
}
PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc)
{
PWINE_ACMLOCALDRIVER paldrv;
TRACE("(%p, %p)\n", hModule, lpDriverProc);
if (!hModule || !lpDriverProc) return NULL;
/* look up previous instance of local driver module */
for (paldrv = MSACM_pFirstACMLocalDriver; paldrv; paldrv = paldrv->pNextACMLocalDrv)
{
if (paldrv->hModule == hModule && paldrv->lpDrvProc == lpDriverProc) return paldrv;
}
paldrv = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMLOCALDRIVER));
paldrv->obj.dwType = WINE_ACMOBJ_LOCALDRIVER;
paldrv->obj.pACMDriverID = 0;
paldrv->hModule = hModule;
paldrv->lpDrvProc = lpDriverProc;
paldrv->pACMInstList = NULL;
paldrv->pNextACMLocalDrv = NULL;
paldrv->pPrevACMLocalDrv = MSACM_pLastACMLocalDriver;
if (MSACM_pLastACMLocalDriver)
MSACM_pLastACMLocalDriver->pNextACMLocalDrv = paldrv;
MSACM_pLastACMLocalDriver = paldrv;
if (!MSACM_pFirstACMLocalDriver)
MSACM_pFirstACMLocalDriver = paldrv;
return paldrv;
}
/**************************************************************************
* MSACM_GetNumberOfModuleRefs [internal]
*
* Returns the number of open drivers which share the same module.
* Inspired from implementation in dlls/winmm/driver.c
*/
static unsigned MSACM_GetNumberOfModuleRefs(HMODULE hModule, DRIVERPROC lpDrvProc, WINE_ACMLOCALDRIVERINST ** found)
{
PWINE_ACMLOCALDRIVER lpDrv;
unsigned count = 0;
if (found) *found = NULL;
for (lpDrv = MSACM_pFirstACMLocalDriver; lpDrv; lpDrv = lpDrv->pNextACMLocalDrv)
{
if (lpDrv->hModule == hModule && lpDrv->lpDrvProc == lpDrvProc)
{
PWINE_ACMLOCALDRIVERINST pInst = lpDrv->pACMInstList;
while (pInst) {
if (found && !*found) *found = pInst;
count++;
pInst = pInst->pNextACMInst;
}
}
}
return count;
}
/**************************************************************************
* MSACM_RemoveFromList [internal]
*
* Generates all the logic to handle driver closure / deletion
* Removes a driver struct to the list of open drivers.
*/
static BOOL MSACM_RemoveFromList(PWINE_ACMLOCALDRIVERINST lpDrv)
{
PWINE_ACMLOCALDRIVER pDriverBase = lpDrv->pLocalDriver;
PWINE_ACMLOCALDRIVERINST pPrevInst;
/* last of this driver in list ? */
if (MSACM_GetNumberOfModuleRefs(pDriverBase->hModule, pDriverBase->lpDrvProc, NULL) == 1) {
MSACM_DRIVER_SendMessage(lpDrv, DRV_DISABLE, 0L, 0L);
MSACM_DRIVER_SendMessage(lpDrv, DRV_FREE, 0L, 0L);
}
pPrevInst = NULL;
if (pDriverBase->pACMInstList != lpDrv) {
pPrevInst = pDriverBase->pACMInstList;
while (pPrevInst && pPrevInst->pNextACMInst != lpDrv)
pPrevInst = pPrevInst->pNextACMInst;
if (!pPrevInst) {
ERR("requested to remove invalid instance %p\n", pPrevInst);
return FALSE;
}
}
if (!pPrevInst) {
/* first driver instance on list */
pDriverBase->pACMInstList = lpDrv->pNextACMInst;
} else {
pPrevInst->pNextACMInst = lpDrv->pNextACMInst;
}
return TRUE;
}
/**************************************************************************
* MSACM_AddToList [internal]
*
* Adds a driver struct to the list of open drivers.
* Generates all the logic to handle driver creation / open.
*/
static BOOL MSACM_AddToList(PWINE_ACMLOCALDRIVERINST lpNewDrv, LPARAM lParam2)
{
PWINE_ACMLOCALDRIVER pDriverBase = lpNewDrv->pLocalDriver;
/* first of this driver in list ? */
if (MSACM_GetNumberOfModuleRefs(pDriverBase->hModule, pDriverBase->lpDrvProc, NULL) == 0) {
if (MSACM_DRIVER_SendMessage(lpNewDrv, DRV_LOAD, 0L, 0L) != DRV_SUCCESS) {
FIXME("DRV_LOAD failed on driver %p\n", lpNewDrv);
return FALSE;
}
/* returned value is not checked */
MSACM_DRIVER_SendMessage(lpNewDrv, DRV_ENABLE, 0L, 0L);
}
lpNewDrv->pNextACMInst = NULL;
if (pDriverBase->pACMInstList == NULL) {
pDriverBase->pACMInstList = lpNewDrv;
} else {
PWINE_ACMLOCALDRIVERINST lpDrvInst = pDriverBase->pACMInstList;
while (lpDrvInst->pNextACMInst != NULL)
lpDrvInst = lpDrvInst->pNextACMInst;
lpDrvInst->pNextACMInst = lpNewDrv;
}
/* Now just open a new instance of a driver on this module */
lpNewDrv->dwDriverID = MSACM_DRIVER_SendMessage(lpNewDrv, DRV_OPEN, 0, lParam2);
if (lpNewDrv->dwDriverID == 0) {
FIXME("DRV_OPEN failed on driver %p\n", lpNewDrv);
MSACM_RemoveFromList(lpNewDrv);
return FALSE;
}
return TRUE;
}
PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER paldrv, LPARAM lParam2)
{
PWINE_ACMLOCALDRIVERINST pDrvInst;
pDrvInst = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMLOCALDRIVERINST));
pDrvInst->pLocalDriver = paldrv;
pDrvInst->dwDriverID = 0;
pDrvInst->pNextACMInst = NULL;
pDrvInst->bSession = FALSE;
/* Win32 installable drivers must support a two phase opening scheme:
* + first open with NULL as lParam2 (session instance),
* + then do a second open with the real non null lParam2)
*/
if (MSACM_GetNumberOfModuleRefs(paldrv->hModule, paldrv->lpDrvProc, NULL) == 0 && lParam2)
{
PWINE_ACMLOCALDRIVERINST ret;
if (!MSACM_AddToList(pDrvInst, 0L))
{
ERR("load0 failed\n");
goto exit;
}
ret = MSACM_OpenLocalDriver(paldrv, lParam2);
if (!ret)
{
MSACM_CloseLocalDriver(pDrvInst);
ERR("load1 failed\n");
goto exit;
}
pDrvInst->bSession = TRUE;
return ret;
}
if (!MSACM_AddToList(pDrvInst, lParam2))
{
ERR("load failed\n");
goto exit;
}
TRACE("=> %p\n", pDrvInst);
return pDrvInst;
exit:
HeapFree(MSACM_hHeap, 0, pDrvInst);
return NULL;
}
LRESULT MSACM_CloseLocalDriver(PWINE_ACMLOCALDRIVERINST paldrv)
{
if (MSACM_RemoveFromList(paldrv)) {
PWINE_ACMLOCALDRIVERINST lpDrv0;
PWINE_ACMLOCALDRIVER pDriverBase = paldrv->pLocalDriver;
MSACM_DRIVER_SendMessage(paldrv, DRV_CLOSE, 0, 0);
paldrv->dwDriverID = 0;
if (paldrv->bSession)
ERR("should not directly close session instance (%p)\n", paldrv);
/* if driver has an opened session instance, we have to close it too */
if (MSACM_GetNumberOfModuleRefs(pDriverBase->hModule, pDriverBase->lpDrvProc, &lpDrv0) == 1 &&
lpDrv0->bSession)
{
MSACM_DRIVER_SendMessage(lpDrv0, DRV_CLOSE, 0L, 0L);
lpDrv0->dwDriverID = 0;
MSACM_RemoveFromList(lpDrv0);
HeapFree(GetProcessHeap(), 0, lpDrv0);
}
HeapFree(MSACM_hHeap, 0, paldrv);
return TRUE;
}
ERR("unable to close driver instance\n");
return FALSE;
}

View file

@ -23,18 +23,26 @@
#include "winuser.h"
#include "wineacm.h"
#include "msacm_Cs.rc"
#include "msacm_Da.rc"
#include "msacm_De.rc"
#include "msacm_El.rc"
#include "msacm_En.rc"
#include "msacm_De.rc"
#include "msacm_Es.rc"
#include "msacm_Fr.rc"
#include "msacm_Hu.rc"
#include "msacm_It.rc"
#include "msacm_Ja.rc"
#include "msacm_Ko.rc"
#include "msacm_Lt.rc"
#include "msacm_Nl.rc"
#include "msacm_No.rc"
#include "msacm_Pl.rc"
#include "msacm_Pt.rc"
#include "msacm_Ro.rc"
#include "msacm_Ru.rc"
#include "msacm_Si.rc"
#include "msacm_Sv.rc"
#include "msacm_Hu.rc"
#include "msacm_Tr.rc"
#include "msacm_Uk.rc"
#include "msacm_Zh.rc"

View file

@ -42,5 +42,6 @@
@ stdcall acmStreamSize(long long ptr long)
@ stdcall acmStreamUnprepareHeader(long ptr long)
# this is wine only
@ stdcall DriverProc(long long long long long) PCM_DriverProc
################################################################
# Wine internal extension
@ stdcall -private DriverProc(long long long long long) PCM_DriverProc

View file

@ -18,16 +18,16 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wine/debug.h"
#include "mmsystem.h"
#define NOBITMAP
#include "mmreg.h"
#include "msacm.h"
#include "msacmdrv.h"
@ -44,7 +44,7 @@ HINSTANCE MSACM_hInstance32 = 0;
*/
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("%p 0x%lx %p\n", hInstDLL, fdwReason, lpvReserved);
TRACE("%p 0x%x %p\n", hInstDLL, fdwReason, lpvReserved);
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
@ -86,7 +86,7 @@ DWORD WINAPI acmGetVersion(void)
case VER_PLATFORM_WIN32_NT:
return 0x04000565; /* 4.0.1381 */
default:
FIXME("%lx not supported\n", version.dwPlatformId);
FIXME("%x not supported\n", version.dwPlatformId);
case VER_PLATFORM_WIN32_WINDOWS:
return 0x04030000; /* 4.3.0 */
}
@ -107,7 +107,7 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
BOOL bLocal = TRUE;
PWINE_ACMDRIVERID padid;
DWORD val = 0;
int i;
unsigned int i;
MMRESULT mmr = MMSYSERR_NOERROR;
TRACE("(%p, %d, %p);\n", hao, uMetric, pMetric);
@ -220,11 +220,43 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
FIXME("ACM_METRIC_COUNT_HARDWARE not implemented\n");
break;
case ACM_METRIC_DRIVER_PRIORITY:
/* Return current list position of driver */
if (!hao) return MMSYSERR_INVALHANDLE;
mmr = MMSYSERR_INVALHANDLE;
for (i = 1, padid = MSACM_pFirstACMDriverID; padid; i++, padid = padid->pNextACMDriverID) {
if (padid == (PWINE_ACMDRIVERID)hao) {
if (pMetric) {
*(LPDWORD)pMetric = i;
mmr = MMSYSERR_NOERROR;
} else {
mmr = MMSYSERR_INVALPARAM;
}
break;
}
}
break;
case ACM_METRIC_DRIVER_SUPPORT:
/* Return fdwSupport for driver */
if (!hao) return MMSYSERR_INVALHANDLE;
mmr = MMSYSERR_INVALHANDLE;
for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
if (padid == (PWINE_ACMDRIVERID)hao) {
if (pMetric) {
*(LPDWORD)pMetric = padid->fdwSupport;
mmr = MMSYSERR_NOERROR;
} else {
mmr = MMSYSERR_INVALPARAM;
}
break;
}
}
break;
case ACM_METRIC_HARDWARE_WAVE_INPUT:
case ACM_METRIC_HARDWARE_WAVE_OUTPUT:
case ACM_METRIC_MAX_SIZE_FILTER:
case ACM_METRIC_DRIVER_SUPPORT:
case ACM_METRIC_DRIVER_PRIORITY:
default:
FIXME("(%p, %d, %p): stub\n", hao, uMetric, pMetric);
mmr = MMSYSERR_NOTSUPPORTED;

View file

@ -0,0 +1,62 @@
/* Hey, Emacs, open this file with -*- coding: cp1250 -*-
*
* Copyright 2000 Eric Pouech
*
* Czech resources for MS ACM
* Copyright 2004 David Kredba
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
/* Czech strings in CP1250 */
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Výbìr zvuku"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Název:", -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 "&Uložit jako", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "Odeb&rat", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "&Formát:", -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 "&Atributy:", -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 "Storno", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "P&omoc", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

View file

@ -0,0 +1,58 @@
/*
* Danish resource file for MS ACM
*
* Copyright (C) 2008 Jens Albretsen <jens@albretsen.dk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
LANGUAGE LANG_DANISH, SUBLANG_DEFAULT
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Lyd valg"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Navn:", -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 "Gem &som...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "Fje&rn", 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 "&Attributter:", -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 "Annuller", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "&Hjælp", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

View file

@ -1,7 +1,7 @@
/*
* German resource file for MS ACM
*
* by Friedrich Stange (dj_smith_reactos@online.de)
* Copyright 2004 Henning Gerhardt
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -15,14 +15,18 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
#pragma code_page(65001)
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Sound auswahl"
CAPTION "Soundauswahl"
FONT 8, "MS Shell Dlg"
BEGIN
@ -31,15 +35,15 @@ BEGIN
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 115, 60,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Speichern als...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Löschen", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
PUSHBUTTON "Speichern &unter...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Entfernen", 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 "&Eigenschaften:", -1, 5, 59, 44, 8, NOT WS_GROUP
LTEXT "&Attribute:", -1, 5, 59, 44, 8, NOT WS_GROUP
#if 0
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60,

View file

@ -15,10 +15,12 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#include "wineacm.h"
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU

View file

@ -15,9 +15,11 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100

View file

@ -2,7 +2,7 @@
* French resource file for MS ACM
*
* Copyright 2000 Eric Pouech
* Copyright 2003 Vincent Béron
* Copyright 2003 Vincent Béron
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -16,28 +16,33 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
/* UTF-8 */
#pragma code_page(65001)
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 250, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Sélection du son"
CAPTION "Sélection du son"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Nom :", -1, 5, 5, 115, 8, NOT WS_GROUP
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 115, 60,
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 115, 15,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Enregistrer sous...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Retirer", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
PUSHBUTTON "&Enregistrer sous...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 70, 14
PUSHBUTTON "&Supprimer", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 199, 14, 45, 14
LTEXT "&Format :", -1, 5, 41, 44, 8, NOT WS_GROUP
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 50, 39, 170, 60,
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 48, 39, 197, 15,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&Attributs :", -1, 5, 59, 44, 8, NOT WS_GROUP
@ -47,11 +52,11 @@ BEGIN
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP |
CBS_OWNERDRAWFIXED | CBS_HASSTRINGS
#else
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60,
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 48, 57, 197, 60,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
#endif
DEFPUSHBUTTON "OK", IDOK, 48, 80, 40, 14
PUSHBUTTON "Annuler", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "&Aide", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
PUSHBUTTON "Aid&e", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

View file

@ -1,8 +1,7 @@
/*
* Hungarian resource file for MS ACM
*
* Copyright 2000 Eric Pouech
* Copyright 2005 Gergely Risko
* Copyright 2006 Andras Kovacs
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -16,14 +15,16 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Hang Kiválasztása"
CAPTION "Hang kiválasztás"
FONT 8, "MS Shell Dlg"
BEGIN
@ -33,7 +34,7 @@ BEGIN
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Mentés másként...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
/* NOT TRANSLATED */ PUSHBUTTON "&Remove", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
PUSHBUTTON "&Eltávolítás", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "&Formátum:", -1, 5, 41, 44, 8, NOT WS_GROUP

View file

@ -16,9 +16,11 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
@ -51,7 +53,7 @@ BEGIN
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
#endif
DEFPUSHBUTTON "OK", IDOK, 48, 80, 40, 14
PUSHBUTTON "Anulla", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "Annulla", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "&Aiuto", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

View file

@ -15,31 +15,36 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
/* UTF-8 */
#pragma code_page(65001)
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "サウンドの選択"
FONT 9, "MS UI Gothic"
CAPTION "サウンドの選択"
FONT 9, "MS Shell Dlg"
BEGIN
LTEXT "名前(&N):", -1, 5, 5, 115, 8, NOT WS_GROUP
LTEXT "名前(&N):", -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 "名前を付けて保存(&S)...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "削除(&R)", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
PUSHBUTTON "名前を付けて保存(&S)...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "削除(&R)", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "フォーマット(&F):", -1, 5, 41, 44, 8, NOT WS_GROUP
LTEXT "フォーマット(&F):", -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 "属性(&A):", -1, 5, 59, 44, 8, NOT WS_GROUP
LTEXT "属性(&A):", -1, 5, 59, 44, 8, NOT WS_GROUP
#if 0
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60,
@ -50,7 +55,7 @@ BEGIN
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
#endif
DEFPUSHBUTTON "OK", IDOK, 48, 80, 40, 14
PUSHBUTTON "キャンセル", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "ヘルプ(&H)", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
PUSHBUTTON "キャンセル", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "ヘルプ(&H)", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

View file

@ -0,0 +1,58 @@
/*
* Korean resource file for MS ACM
*
* Copyright 2005,2007 YunSong Hwang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "사운드 선택"
FONT 9, "MS Shell Dlg"
BEGIN
LTEXT "이름(&N):", -1, 5, 5, 115, 8, NOT WS_GROUP
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 97, 60,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "다른 이름으로 저장(&S)...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 103, 14, 70, 14
PUSHBUTTON "제거(&R)", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "형식(&F):", -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 "속성(&A):", -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 "확인", IDOK, 48, 80, 40, 14
PUSHBUTTON "취소", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "도움말(&H)", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

View file

@ -0,0 +1,61 @@
/*
* Lithuanian resource file for MS ACM
*
* Copyright 2009 Aurimas Fišeras <aurimas@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
/* UTF-8 */
#pragma code_page(65001)
LANGUAGE LANG_LITHUANIAN, SUBLANG_NEUTRAL
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Garso parinkimas"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Pavadinimas:", -1, 5, 5, 115, 8, NOT WS_GROUP
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 100, 60,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Išsaugoti k&aip...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 110, 14, 60, 14
PUSHBUTTON "Pa&šalinti", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "&Formatas:", -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 "A&tributai:", -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 "Gerai", IDOK, 48, 80, 40, 14
PUSHBUTTON "Atsisakyti", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "&Žinynas", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

View file

@ -15,9 +15,11 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100

View file

@ -1,7 +1,7 @@
/*
* Norwegian resource file for MS ACM
* Norwegian Bokmål resource file for MS ACM
*
* Copyright 2000 Eric Pouech
* Copyright 2005 Alexander N. Sørnes <alex@thehandofagony.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -15,14 +15,16 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
#include "wineacm.h"
LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Lyd utvalg"
CAPTION "Lydutvalg"
FONT 8, "MS Shell Dlg"
BEGIN
@ -31,8 +33,8 @@ BEGIN
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 115, 60,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Lagre som...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Fjern", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
PUSHBUTTON "Lagre &som...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "Fje&rn", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "&Format:", -1, 5, 41, 44, 8, NOT WS_GROUP

View file

@ -1,15 +1,31 @@
/*
* translated by TestamenT
* testament@users.sourceforge.net
* https://sourceforge.net/projects/reactospl
* Polish resource file for MS ACM
*
* Copyright 2000 Eric Pouech
* Copyright 2004 Piotr Caban
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 235, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Sekcja dŸwiêku"
CAPTION "Wybór d¿wiêku"
FONT 8, "MS Shell Dlg"
BEGIN
@ -18,26 +34,26 @@ BEGIN
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 115, 60,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Zapisz jako...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Usuñ", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
PUSHBUTTON "&Zapisz jako...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 50, 14
PUSHBUTTON "&Usuñ", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 180, 14, 50, 14
LTEXT "&Format:", -1, 5, 41, 44, 8, NOT WS_GROUP
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 50, 39, 170, 60,
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 50, 39, 180, 60,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&W³aœciwoœci:", -1, 5, 59, 44, 8, NOT WS_GROUP
LTEXT "&Atrybuty:", -1, 5, 59, 44, 8, NOT WS_GROUP
#if 0
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60,
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 180, 60,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP |
CBS_OWNERDRAWFIXED | CBS_HASSTRINGS
#else
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60,
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 180, 60,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
#endif
DEFPUSHBUTTON "OK", IDOK, 48, 80, 40, 14
PUSHBUTTON "Anuluj", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "Pomo&c", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
DEFPUSHBUTTON "OK", IDOK, 53, 80, 40, 14
PUSHBUTTON "Anuluj", IDCANCEL, 97, 80, 40, 14
PUSHBUTTON "&Pomoc", IDD_ACMFORMATCHOOSE_BTN_HELP, 141, 80, 40, 14
END

View file

@ -2,6 +2,7 @@
* Portuguese resource file for MS ACM
*
* Copyright 2003 Marcelo Duarte
* Copyright 2006 Américo José Melo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -15,14 +16,16 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
#include "wineacm.h"
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Seleção de som"
CAPTION "Selecção de som"
FONT 8, "MS Shell Dlg"
BEGIN
@ -31,7 +34,44 @@ BEGIN
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 115, 60,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Salvar como...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Gravar como...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Remover", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "&Formato:", -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 "&Atributos:", -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 "Cancelar", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "Aj&uda", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Selecção de som"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Nome:", -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 "&Gravar como...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Remover", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "&Formato:", -1, 5, 41, 44, 8, NOT WS_GROUP

View file

@ -0,0 +1,54 @@
/*
* Copyright 2000 Eric Pouech
* Copyright 2008 Michael Stefaniuc
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
#pragma code_page(65001)
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 "&Nume:", -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 "&Salvează ca", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Elimină", 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 "&Atribute:", -1, 5, 59, 44, 8, NOT WS_GROUP
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "OK", IDOK, 48, 80, 40, 14
PUSHBUTTON "Renunță", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "&Ajutor", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

View file

@ -1,7 +1,7 @@
/*
* Russian resource file for MS ACM
*
* Copyright 2005 Mikhail Y. Zvyozdochkin
* Copyright 2008 Vitaliy Margolen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -15,43 +15,47 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
/* UTF-8 */
#pragma code_page(65001)
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 234, 101
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Âûáîð çâóêà"
CAPTION "Выбор звука"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Èìÿ:", -1, 5, 5, 115, 8, NOT WS_GROUP
LTEXT "&Имя:", -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 "Ñîõð&àíèòü êàê...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 58, 14
PUSHBUTTON "&Óäàëèòü", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 187, 14, 38, 14
PUSHBUTTON "&Сохранить как...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Удалить", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "&Ôîðìàò:", -1, 5, 41, 44, 8, NOT WS_GROUP
LTEXT "&Формат:", -1, 5, 41, 44, 8, NOT WS_GROUP
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 50, 39, 177, 60,
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 50, 39, 170, 60,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&Ñâîéñòâà:", -1, 5, 59, 44, 8, NOT WS_GROUP
LTEXT "&Свойства:", -1, 5, 59, 44, 8, NOT WS_GROUP
#if 0
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 177, 60,
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, 177, 60,
COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
#endif
DEFPUSHBUTTON "OK", IDOK, 48, 80, 40, 14
PUSHBUTTON "Îòìåíà", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "Ñ&ïðàâêà", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
PUSHBUTTON "Отмена", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "&Помощь", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

View file

@ -0,0 +1,60 @@
/*
* Slovenian resource file for MS ACM
*
* Copyright 2008 Rok Mandeljc
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
#pragma code_page(65001)
LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Izbira zvoka"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Ime:", -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 "&Shrani kot ...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Odstrani", 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 "&Lastnosti:", -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 "V redu", IDOK, 48, 80, 40, 14
PUSHBUTTON "Prekliči", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "&Pomoč", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

View file

@ -1,7 +1,7 @@
/*
* Swedish resource file for MS ACM
*
* Copyright 2005 Anders Bergh
* Copyright 2007 Daniel Nylander
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -15,9 +15,11 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100

View file

@ -0,0 +1,58 @@
/*
* Turkish resource file for MS ACM
*
* Copyright 2006 Fatih Aþýcý
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Ses Seçimi"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Ad:", -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 "&Farklý Kaydet...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "&Kaldýr", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "&Biçim:", -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 "&Öznitelikler:", -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 "Tamam", IDOK, 48, 80, 40, 14
PUSHBUTTON "Ýptal", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "&Yardým", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

View file

@ -0,0 +1,98 @@
/*
* MS ACM (Simplified and Traditional Chinese Resources)
*
* Copyright 2008 Hongbo Ni <hongbo.at.njstar.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wineacm.h"
/* Chinese text is encoded in UTF-8 */
#pragma code_page(65001)
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "声音选择"
FONT 9, "MS Shell Dlg"
BEGIN
LTEXT "名称(&N):", -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 "保存为(&S)...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "删除(&R)", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "格式(&F):", -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 "属性(&A):", -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 "确定", IDOK, 48, 80, 40, 14
PUSHBUTTON "取消", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "帮助(&H)", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "聲音選擇"
FONT 9, "MS Shell Dlg"
BEGIN
LTEXT "名稱(&N):", -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 "儲存為(&S)...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14
PUSHBUTTON "刪除(&R)", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14
LTEXT "格式(&F):", -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 "屬性(&A):", -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 "確定", IDOK, 48, 80, 40, 14
PUSHBUTTON "取消", IDCANCEL, 92, 80, 40, 14
PUSHBUTTON "幫助(&H)", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14
END

File diff suppressed because it is too large Load diff

View file

@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* TODO
@ -35,6 +35,7 @@
#include "winerror.h"
#include "wine/debug.h"
#include "mmsystem.h"
#define NOBITMAP
#include "mmreg.h"
#include "msacm.h"
#include "msacmdrv.h"
@ -57,13 +58,13 @@ MMRESULT WINAPI acmStreamClose(HACMSTREAM has, DWORD fdwClose)
PWINE_ACMSTREAM was;
MMRESULT ret;
TRACE("(%p, %ld)\n", has, fdwClose);
TRACE("(%p, %d)\n", has, fdwClose);
if ((was = ACM_GetStream(has)) == NULL) {
WARN("invalid handle\n");
return MMSYSERR_INVALHANDLE;
}
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_CLOSE, (DWORD)&was->drvInst, 0);
ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_CLOSE, (LPARAM)&was->drvInst, 0);
if (ret == MMSYSERR_NOERROR) {
if (was->hAcmDriver)
acmDriverClose(was->hAcmDriver, 0L);
@ -83,7 +84,7 @@ MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, PACMSTREAMHEADER pash,
MMRESULT ret = MMSYSERR_NOERROR;
PACMDRVSTREAMHEADER padsh;
TRACE("(%p, %p, %ld)\n", has, pash, fdwConvert);
TRACE("(%p, %p, %d)\n", has, pash, fdwConvert);
if ((was = ACM_GetStream(has)) == NULL) {
WARN("invalid handle\n");
@ -98,6 +99,9 @@ MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, PACMSTREAMHEADER pash,
return ACMERR_UNPREPARED;
}
pash->cbSrcLengthUsed = 0;
pash->cbDstLengthUsed = 0;
/* Note: the ACMSTREAMHEADER and ACMDRVSTREAMHEADER structs are of same
* size. some fields are private to msacm internals, and are exposed
* in ACMSTREAMHEADER in the dwReservedDriver array
@ -115,7 +119,7 @@ MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, PACMSTREAMHEADER pash,
padsh->fdwConvert = fdwConvert;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_CONVERT, (DWORD)&was->drvInst, (DWORD)padsh);
ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_CONVERT, (LPARAM)&was->drvInst, (LPARAM)padsh);
if (ret == MMSYSERR_NOERROR) {
padsh->fdwStatus |= ACMSTREAMHEADER_STATUSF_DONE;
}
@ -137,9 +141,10 @@ MMRESULT WINAPI acmStreamMessage(HACMSTREAM has, UINT uMsg, LPARAM lParam1,
/***********************************************************************
* acmStreamOpen (MSACM32.@)
*/
MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD dwCallback,
DWORD dwInstance, DWORD fdwOpen)
MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had,
PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst,
PWAVEFILTER pwfltr, DWORD_PTR dwCallback,
DWORD_PTR dwInstance, DWORD fdwOpen)
{
PWINE_ACMSTREAM was;
PWINE_ACMDRIVER wad;
@ -148,7 +153,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw
int wfxDstSize;
WAVEFORMATEX wfxSrc, wfxDst;
TRACE("(%p, %p, %p, %p, %p, %ld, %ld, %ld)\n",
TRACE("(%p, %p, %p, %p, %p, %ld, %ld, %d)\n",
phas, had, pwfxSrc, pwfxDst, pwfltr, dwCallback, dwInstance, fdwOpen);
/* NOTE: pwfxSrc and/or pwfxDst can point to a structure smaller than
@ -167,11 +172,11 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw
pwfxDst = &wfxDst;
}
TRACE("src [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%lu, nAvgBytesPerSec=%lu, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n",
TRACE("src [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%u, nAvgBytesPerSec=%u, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n",
pwfxSrc->wFormatTag, pwfxSrc->nChannels, pwfxSrc->nSamplesPerSec, pwfxSrc->nAvgBytesPerSec,
pwfxSrc->nBlockAlign, pwfxSrc->wBitsPerSample, pwfxSrc->cbSize);
TRACE("dst [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%lu, nAvgBytesPerSec=%lu, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n",
TRACE("dst [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%u, nAvgBytesPerSec=%u, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n",
pwfxDst->wFormatTag, pwfxDst->nChannels, pwfxDst->nSamplesPerSec, pwfxDst->nAvgBytesPerSec,
pwfxDst->nBlockAlign, pwfxDst->wBitsPerSample, pwfxDst->cbSize);
@ -227,7 +232,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw
was->pDrv = wad;
was->hAcmDriver = 0; /* not to close it in acmStreamClose */
ret = SendDriverMessage(wad->hDrvr, ACMDM_STREAM_OPEN, (DWORD)&was->drvInst, 0L);
ret = MSACM_Message((HACMDRIVER)wad, ACMDM_STREAM_OPEN, (LPARAM)&was->drvInst, 0L);
if (ret != MMSYSERR_NOERROR)
goto errCleanUp;
} else {
@ -248,7 +253,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw
was->pDrv = wad;
was->hAcmDriver = had;
ret = SendDriverMessage(wad->hDrvr, ACMDM_STREAM_OPEN, (DWORD)&was->drvInst, 0L);
ret = MSACM_Message((HACMDRIVER)wad, ACMDM_STREAM_OPEN, (LPARAM)&was->drvInst, 0L);
TRACE("%s => %08x\n", debugstr_w(wadi->pszDriverAlias), ret);
if (ret == MMSYSERR_NOERROR) {
if (fdwOpen & ACM_STREAMOPENF_QUERY) {
@ -292,7 +297,7 @@ MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
MMRESULT ret = MMSYSERR_NOERROR;
PACMDRVSTREAMHEADER padsh;
TRACE("(%p, %p, %ld)\n", has, pash, fdwPrepare);
TRACE("(%p, %p, %d)\n", has, pash, fdwPrepare);
if ((was = ACM_GetStream(has)) == NULL) {
WARN("invalid handle\n");
@ -325,7 +330,7 @@ MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
padsh->pbPreparedDst = 0;
padsh->cbPreparedDstLength = 0;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_PREPARE, (DWORD)&was->drvInst, (DWORD)padsh);
ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_PREPARE, (LPARAM)&was->drvInst, (LPARAM)padsh);
if (ret == MMSYSERR_NOERROR || ret == MMSYSERR_NOTSUPPORTED) {
ret = MMSYSERR_NOERROR;
padsh->fdwStatus &= ~(ACMSTREAMHEADER_STATUSF_DONE|ACMSTREAMHEADER_STATUSF_INQUEUE);
@ -356,7 +361,7 @@ MMRESULT WINAPI acmStreamReset(HACMSTREAM has, DWORD fdwReset)
PWINE_ACMSTREAM was;
MMRESULT ret = MMSYSERR_NOERROR;
TRACE("(%p, %ld)\n", has, fdwReset);
TRACE("(%p, %d)\n", has, fdwReset);
if (fdwReset) {
WARN("invalid flag\n");
@ -365,7 +370,7 @@ MMRESULT WINAPI acmStreamReset(HACMSTREAM has, DWORD fdwReset)
WARN("invalid handle\n");
return MMSYSERR_INVALHANDLE;
} else if (was->drvInst.fdwOpen & ACM_STREAMOPENF_ASYNC) {
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_RESET, (DWORD)&was->drvInst, 0);
ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_RESET, (LPARAM)&was->drvInst, 0);
}
TRACE("=> (%d)\n", ret);
return ret;
@ -381,7 +386,7 @@ MMRESULT WINAPI acmStreamSize(HACMSTREAM has, DWORD cbInput,
ACMDRVSTREAMSIZE adss;
MMRESULT ret;
TRACE("(%p, %ld, %p, %ld)\n", has, cbInput, pdwOutputBytes, fdwSize);
TRACE("(%p, %d, %p, %d)\n", has, cbInput, pdwOutputBytes, fdwSize);
if ((was = ACM_GetStream(has)) == NULL) {
WARN("invalid handle\n");
@ -410,8 +415,8 @@ MMRESULT WINAPI acmStreamSize(HACMSTREAM has, DWORD cbInput,
adss.cbStruct = sizeof(adss);
adss.fdwSize = fdwSize;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_SIZE,
(DWORD)&was->drvInst, (DWORD)&adss);
ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_SIZE,
(LPARAM)&was->drvInst, (LPARAM)&adss);
if (ret == MMSYSERR_NOERROR) {
switch (fdwSize & ACM_STREAMSIZEF_QUERYMASK) {
case ACM_STREAMSIZEF_DESTINATION:
@ -422,7 +427,7 @@ MMRESULT WINAPI acmStreamSize(HACMSTREAM has, DWORD cbInput,
break;
}
}
TRACE("=> (%d) [%lu]\n", ret, *pdwOutputBytes);
TRACE("=> (%d) [%u]\n", ret, *pdwOutputBytes);
return ret;
}
@ -436,7 +441,7 @@ MMRESULT WINAPI acmStreamUnprepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
MMRESULT ret = MMSYSERR_NOERROR;
PACMDRVSTREAMHEADER padsh;
TRACE("(%p, %p, %ld)\n", has, pash, fdwUnprepare);
TRACE("(%p, %p, %d)\n", has, pash, fdwUnprepare);
if ((was = ACM_GetStream(has)) == NULL) {
WARN("invalid handle\n");
@ -468,7 +473,7 @@ MMRESULT WINAPI acmStreamUnprepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
padsh->fdwConvert = fdwUnprepare;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_UNPREPARE, (DWORD)&was->drvInst, (DWORD)padsh);
ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_UNPREPARE, (LPARAM)&was->drvInst, (LPARAM)padsh);
if (ret == MMSYSERR_NOERROR || ret == MMSYSERR_NOTSUPPORTED) {
ret = MMSYSERR_NOERROR;
padsh->fdwStatus &= ~(ACMSTREAMHEADER_STATUSF_DONE|ACMSTREAMHEADER_STATUSF_INQUEUE|ACMSTREAMHEADER_STATUSF_PREPARED);

View file

@ -14,274 +14,14 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_WINEACM_H
#define __WINE_WINEACM_H
#ifndef __REACTOS__
#include "wine/windef16.h"
//#include "wine/mmsystem16.h"
/***********************************************************************
* Win16 definitions
*/
typedef BOOL16 (CALLBACK *ACMDRIVERENUMCB16)(
HACMDRIVERID16 hadid, DWORD dwInstance, DWORD fdwSupport
);
typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROC16)(
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
);
typedef UINT16 (CALLBACK *ACMFORMATCHOOSEHOOKPROC16)(
HWND16 hwnd, UINT16 uMsg, WPARAM16 wParam, LPARAM lParam
);
typedef struct _ACMDRIVERDETAILS16
{
DWORD cbStruct;
FOURCC fccType;
FOURCC fccComp;
WORD wMid;
WORD wPid;
DWORD vdwACM;
DWORD vdwDriver;
DWORD fdwSupport;
DWORD cFormatTags;
DWORD cFilterTags;
HICON16 hicon;
CHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
CHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
CHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
CHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
CHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
} ACMDRIVERDETAILS16, *NPACMDRIVERDETAILS16, *LPACMDRIVERDETAILS16;
typedef struct _ACMFILTERCHOOSE16
{
DWORD cbStruct;
DWORD fdwStyle;
HWND16 hwndOwner;
LPWAVEFILTER pwfltr;
DWORD cbwfltr;
LPCSTR pszTitle;
char szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
char szFilter[ACMFILTERDETAILS_FILTER_CHARS];
LPSTR pszName;
DWORD cchName;
DWORD fdwEnum;
LPWAVEFILTER pwfltrEnum;
HINSTANCE16 hInstance;
LPCSTR pszTemplateName;
LPARAM lCustData;
ACMFILTERCHOOSEHOOKPROC16 pfnHook;
} ACMFILTERCHOOSE16, *NPACMFILTERCHOOSE16, *LPACMFILTERCHOOSE16;
typedef struct _ACMFILTERDETAILS16
{
DWORD cbStruct;
DWORD dwFilterIndex;
DWORD dwFilterTag;
DWORD fdwSupport;
LPWAVEFILTER pwfltr;
DWORD cbwfltr;
CHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
} ACMFILTERDETAILS16, *NPACMFILTERDETAILS16, *LPACMFILTERDETAILS16;
typedef struct _ACMFILTERTAGDETAILS16
{
DWORD cbStruct;
DWORD dwFilterTagIndex;
DWORD dwFilterTag;
DWORD cbFilterSize;
DWORD fdwSupport;
DWORD cStandardFilters;
CHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
} ACMFILTERTAGDETAILS16, *NPACMFILTERTAGDETAILS16, *LPACMFILTERTAGDETAILS16;
typedef struct _ACMFORMATCHOOSE16
{
DWORD cbStruct;
DWORD fdwStyle;
HWND16 hwndOwner;
LPWAVEFORMATEX pwfx;
DWORD cbwfx;
LPCSTR pszTitle;
CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
LPSTR pszName;
DWORD cchName;
DWORD fdwEnum;
LPWAVEFORMATEX pwfxEnum;
HINSTANCE16 hInstance;
LPCSTR pszTemplateName;
LPARAM lCustData;
ACMFORMATCHOOSEHOOKPROC16 pfnHook;
} ACMFORMATCHOOSE16, *NPACMFORMATCHOOSE16, *LPACMFORMATCHOOSE16;
typedef struct _ACMFORMATDETAILS16
{
DWORD cbStruct;
DWORD dwFormatIndex;
DWORD dwFormatTag;
DWORD fdwSupport;
LPWAVEFORMATEX pwfx;
DWORD cbwfx;
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
} ACMFORMATDETAILS16, *NPACMFORMATDETAILS16, *LPACMFORMATDETAILS16;
typedef struct _ACMFORMATTAGDETAILS16
{
DWORD cbStruct;
DWORD dwFormatTagIndex;
DWORD dwFormatTag;
DWORD cbFormatSize;
DWORD fdwSupport;
DWORD cStandardFormats;
CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
} ACMFORMATTAGDETAILS16, *NPACMFORMATTAGDETAILS16, *LPACMFORMATTAGDETAILS16;
typedef ACMSTREAMHEADER ACMSTREAMHEADER16, *NPACMSTREAMHEADER16, *LPACMSTREAMHEADER16;
typedef BOOL16 (CALLBACK *ACMFILTERENUMCB16)(
HACMDRIVERID16 hadid, LPACMFILTERDETAILS16 pafd,
DWORD dwInstance, DWORD fdwSupport
);
typedef BOOL16 (CALLBACK *ACMFILTERTAGENUMCB16)(
HACMDRIVERID16 hadid, LPACMFILTERTAGDETAILS16 paftd,
DWORD dwInstance, DWORD fdwSupport
);
typedef BOOL16 (CALLBACK *ACMFORMATENUMCB16)(
HACMDRIVERID16 hadid, LPACMFORMATDETAILS16 pafd,
DWORD dwInstance, DWORD fdwSupport
);
typedef BOOL16 (CALLBACK *ACMFORMATTAGENUMCB16)(
HACMDRIVERID16 hadid, LPACMFORMATTAGDETAILS16 paftd,
DWORD dwInstance, DWORD fdwSupport
);
/***********************************************************************
* Functions - Win16
*/
DWORD WINAPI acmGetVersion16(
);
MMRESULT16 WINAPI acmMetrics16(
HACMOBJ16 hao, UINT16 uMetric, LPVOID pMetric
);
MMRESULT16 WINAPI acmDriverEnum16(
ACMDRIVERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
);
MMRESULT16 WINAPI acmDriverDetails16(
HACMDRIVERID16 hadid, LPACMDRIVERDETAILS16 padd, DWORD fdwDetails
);
MMRESULT16 WINAPI acmDriverAdd16(
LPHACMDRIVERID16 phadid, HINSTANCE16 hinstModule,
LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
);
MMRESULT16 WINAPI acmDriverRemove16(
HACMDRIVERID16 hadid, DWORD fdwRemove
);
MMRESULT16 WINAPI acmDriverOpen16(
LPHACMDRIVER16 phad, HACMDRIVERID16 hadid, DWORD fdwOpen
);
MMRESULT16 WINAPI acmDriverClose16(
HACMDRIVER16 had, DWORD fdwClose
);
LRESULT WINAPI acmDriverMessage16(
HACMDRIVER16 had, UINT16 uMsg, LPARAM lParam1, LPARAM lParam2
);
MMRESULT16 WINAPI acmDriverID16(
HACMOBJ16 hao, LPHACMDRIVERID16 phadid, DWORD fdwDriverID
);
MMRESULT16 WINAPI acmDriverPriority16(
HACMDRIVERID16 hadid, DWORD dwPriority, DWORD fdwPriority
);
MMRESULT16 WINAPI acmFormatTagDetails16(
HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd, DWORD fdwDetails
);
MMRESULT16 WINAPI acmFormatTagEnum16(
HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd,
ACMFORMATTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
);
MMRESULT16 WINAPI acmFormatChoose16(
LPACMFORMATCHOOSE16 pafmtc
);
MMRESULT16 WINAPI acmFormatDetails16(
HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd, DWORD fdwDetails
);
MMRESULT16 WINAPI acmFormatEnum16(
HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd,
ACMFORMATENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
);
MMRESULT16 WINAPI acmFormatSuggest16(
HACMDRIVER16 had, LPWAVEFORMATEX pwfxSrc,
LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest
);
MMRESULT16 WINAPI acmFilterTagDetails16(
HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd, DWORD fdwDetails
);
MMRESULT16 WINAPI acmFilterTagEnum16(
HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd,
ACMFILTERTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
);
MMRESULT16 WINAPI acmFilterChoose16(
LPACMFILTERCHOOSE16 pafltrc
);
MMRESULT16 WINAPI acmFilterDetails16(
HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd, DWORD fdwDetails
);
MMRESULT16 WINAPI acmFilterEnum16(
HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd,
ACMFILTERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
);
MMRESULT16 WINAPI acmStreamOpen16(
LPHACMSTREAM16 phas, HACMDRIVER16 had,
LPWAVEFORMATEX pwfxSrc, LPWAVEFORMATEX pwfxDst,
LPWAVEFILTER pwfltr, DWORD dwCallback,
DWORD dwInstance, DWORD fdwOpen
);
MMRESULT16 WINAPI acmStreamClose16(
HACMSTREAM16 has, DWORD fdwClose
);
MMRESULT16 WINAPI acmStreamSize16(
HACMSTREAM16 has, DWORD cbInput,
LPDWORD pdwOutputBytes, DWORD fdwSize
);
MMRESULT16 WINAPI acmStreamConvert16(
HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwConvert
);
MMRESULT16 WINAPI acmStreamReset16(
HACMSTREAM16 has, DWORD fdwReset
);
MMRESULT16 WINAPI acmStreamPrepareHeader16(
HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwPrepare
);
MMRESULT16 WINAPI acmStreamUnprepareHeader16(
HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwUnprepare
);
#endif
#include <windef.h>
#include <winuser.h>
/***********************************************************************
* Wine specific - Win32
@ -293,6 +33,8 @@ typedef struct _WINE_ACMDRIVER *PWINE_ACMDRIVER;
#define WINE_ACMOBJ_DRIVERID 0x5EED0001
#define WINE_ACMOBJ_DRIVER 0x5EED0002
#define WINE_ACMOBJ_STREAM 0x5EED0003
#define WINE_ACMOBJ_NOTIFYWND 0x5EED0004
#define WINE_ACMOBJ_LOCALDRIVER 0x5EED0005
typedef struct _WINE_ACMOBJ
{
@ -300,10 +42,32 @@ typedef struct _WINE_ACMOBJ
PWINE_ACMDRIVERID pACMDriverID;
} WINE_ACMOBJ, *PWINE_ACMOBJ;
typedef struct _WINE_ACMLOCALDRIVER * PWINE_ACMLOCALDRIVER;
typedef struct _WINE_ACMLOCALDRIVERINST * PWINE_ACMLOCALDRIVERINST;
typedef struct _WINE_ACMLOCALDRIVER
{
WINE_ACMOBJ obj;
HMODULE hModule;
DRIVERPROC lpDrvProc;
PWINE_ACMLOCALDRIVERINST pACMInstList;
PWINE_ACMLOCALDRIVER pNextACMLocalDrv;
PWINE_ACMLOCALDRIVER pPrevACMLocalDrv;
} WINE_ACMLOCALDRIVER;
typedef struct _WINE_ACMLOCALDRIVERINST
{
PWINE_ACMLOCALDRIVER pLocalDriver;
DWORD dwDriverID;
BOOL bSession;
PWINE_ACMLOCALDRIVERINST pNextACMInst;
} WINE_ACMLOCALDRIVERINST;
typedef struct _WINE_ACMDRIVER
{
WINE_ACMOBJ obj;
HDRVR hDrvr;
PWINE_ACMLOCALDRIVERINST pLocalDrvrInst;
PWINE_ACMDRIVER pNextACMDriver;
} WINE_ACMDRIVER;
@ -320,7 +84,7 @@ typedef struct _WINE_ACMDRIVERID
WINE_ACMOBJ obj;
LPWSTR pszDriverAlias;
LPWSTR pszFileName;
HINSTANCE hInstModule; /* NULL if global */
PWINE_ACMLOCALDRIVER pLocalDriver; /* NULL if global */
PWINE_ACMDRIVER pACMDriverList;
PWINE_ACMDRIVERID pNextACMDriverID;
PWINE_ACMDRIVERID pPrevACMDriverID;
@ -334,27 +98,54 @@ typedef struct _WINE_ACMDRIVERID
}* aFormatTag;
} WINE_ACMDRIVERID;
typedef struct _WINE_ACMNOTIFYWND * PWINE_ACMNOTIFYWND;
typedef struct _WINE_ACMNOTIFYWND
{
WINE_ACMOBJ obj;
HWND hNotifyWnd; /* Window to notify on ACM events: driver add, driver removal, priority change */
DWORD dwNotifyMsg; /* Notification message to send to window */
DWORD fdwSupport;
PWINE_ACMNOTIFYWND pNextACMNotifyWnd;
PWINE_ACMNOTIFYWND pPrevACMNotifyWnd;
} WINE_ACMNOTIFYWND;
/* From internal.c */
extern HANDLE MSACM_hHeap;
extern PWINE_ACMDRIVERID MSACM_pFirstACMDriverID;
extern PWINE_ACMDRIVERID MSACM_pLastACMDriverID;
extern PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName,
HINSTANCE hinstModule);
PWINE_ACMLOCALDRIVER pLocalDriver);
extern void MSACM_RegisterAllDrivers(void);
extern PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p);
extern void MSACM_UnregisterAllDrivers(void);
extern PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID);
extern PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver);
extern PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver);
extern PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type);
extern MMRESULT MSACM_Message(HACMDRIVER, UINT, LPARAM, LPARAM);
extern BOOL MSACM_FindFormatTagInCache(WINE_ACMDRIVERID*, DWORD, LPDWORD);
extern BOOL MSACM_FindFormatTagInCache(const WINE_ACMDRIVERID*, DWORD, LPDWORD);
extern void MSACM_RePositionDriver(PWINE_ACMDRIVERID, DWORD);
extern void MSACM_WriteCurrentPriorities(void);
extern void MSACM_BroadcastNotification(void);
extern void MSACM_DisableNotifications(void);
extern void MSACM_EnableNotifications(void);
extern PWINE_ACMNOTIFYWND MSACM_RegisterNotificationWindow(HWND hNotifyWnd, DWORD dwNotifyMsg);
extern PWINE_ACMNOTIFYWND MSACM_UnRegisterNotificationWindow(const WINE_ACMNOTIFYWND*);
extern PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry);
extern PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc);
extern PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER, LPARAM);
extern LRESULT MSACM_CloseLocalDriver(PWINE_ACMLOCALDRIVERINST);
/*
extern PWINE_ACMLOCALDRIVER MSACM_GetLocalDriver(HACMDRIVER hDriver);
*/
/* From msacm32.c */
extern HINSTANCE MSACM_hInstance32;
/* From pcmcnvtr.c */
LRESULT CALLBACK PCM_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg,
LRESULT CALLBACK PCM_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
LPARAM dwParam1, LPARAM dwParam2);
/* Dialog box templates */

View file

@ -15,6 +15,9 @@ extern "C" {
#pragma warning(disable:4201)
#endif
#define DRV_SUCCESS 0x0001
#define DRV_FAILURE 0x0000
#define WINMMAPI DECLSPEC_IMPORT
#define _loadds
#define _huge

View file

@ -242,7 +242,7 @@ typedef HACMOBJ *PHACMOBJ, *LPHACMOBJ;
*/
typedef BOOL (CALLBACK *ACMDRIVERENUMCB)(
HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport
HACMDRIVERID hadid, DWORD_PTR dwInstance, DWORD fdwSupport
);
typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCA)(
@ -539,70 +539,78 @@ DECL_WINELIB_TYPE_AW(ACMFORMATTAGDETAILS)
DECL_WINELIB_TYPE_AW(PACMFORMATTAGDETAILS)
DECL_WINELIB_TYPE_AW(LPACMFORMATTAGDETAILS)
#ifdef _WIN64
# define _ACMSTREAMHEADERRESERVE 15
#else
# define _ACMSTREAMHEADERRESERVE 10
#endif
typedef struct _ACMSTREAMHEADER
{
DWORD cbStruct;
DWORD fdwStatus;
DWORD_PTR dwUser;
LPBYTE pbSrc;
DWORD cbSrcLength;
DWORD cbSrcLengthUsed;
DWORD dwSrcUser;
LPBYTE pbDst;
DWORD cbDstLength;
DWORD cbDstLengthUsed;
DWORD dwDstUser;
DWORD dwReservedDriver[10];
DWORD cbStruct;
DWORD fdwStatus;
DWORD_PTR dwUser;
LPBYTE pbSrc;
DWORD cbSrcLength;
DWORD cbSrcLengthUsed;
DWORD_PTR dwSrcUser;
LPBYTE pbDst;
DWORD cbDstLength;
DWORD cbDstLengthUsed;
DWORD_PTR dwDstUser;
DWORD dwReservedDriver[_ACMSTREAMHEADERRESERVE];
} ACMSTREAMHEADER, *PACMSTREAMHEADER, *LPACMSTREAMHEADER;
#undef _ACMSTREAMHEADERRESERVE
/***********************************************************************
* Callbacks 2
*/
typedef BOOL (CALLBACK *ACMFILTERENUMCBA)(
HACMDRIVERID hadid, PACMFILTERDETAILSA pafd,
DWORD dwInstance, DWORD fdwSupport
DWORD_PTR dwInstance, DWORD fdwSupport
);
typedef BOOL (CALLBACK *ACMFILTERENUMCBW)(
HACMDRIVERID hadid, PACMFILTERDETAILSW pafd,
DWORD dwInstance, DWORD fdwSupport
DWORD_PTR dwInstance, DWORD fdwSupport
);
#define ACMFILTERENUMCB WINELIB_NAME_AW(ACMFILTERENUMCB)
typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBA)(
HACMDRIVERID hadid, PACMFILTERTAGDETAILSA paftd,
DWORD dwInstance, DWORD fdwSupport
DWORD_PTR dwInstance, DWORD fdwSupport
);
typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBW)(
HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftd,
DWORD dwInstance, DWORD fdwSupport
DWORD_PTR dwInstance, DWORD fdwSupport
);
#define ACMFILTERTAGENUMCB WINELIB_NAME_AW(ACMFILTERTAGENUMCB)
typedef BOOL (CALLBACK *ACMFORMATENUMCBA)(
HACMDRIVERID hadid, PACMFORMATDETAILSA pafd,
DWORD dwInstance, DWORD fdwSupport
DWORD_PTR dwInstance, DWORD fdwSupport
);
typedef BOOL (CALLBACK *ACMFORMATENUMCBW)(
HACMDRIVERID hadid, PACMFORMATDETAILSW pafd,
DWORD dwInstance, DWORD fdwSupport
DWORD_PTR dwInstance, DWORD fdwSupport
);
#define ACMFORMATENUMCB WINELIB_NAME_AW(ACMFORMATENUMCB)
typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBA)(
HACMDRIVERID hadid, PACMFORMATTAGDETAILSA paftd,
DWORD dwInstance, DWORD fdwSupport
DWORD_PTR dwInstance, DWORD fdwSupport
);
typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBW)(
HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftd,
DWORD dwInstance, DWORD fdwSupport
DWORD_PTR dwInstance, DWORD fdwSupport
);
#define ACMFORMATTAGENUMCB WINELIB_NAME_AW(ACMFORMATTAGENUMCB)
@ -633,7 +641,7 @@ MMRESULT WINAPI acmDriverDetailsW(
#define acmDriverDetails WINELIB_NAME_AW(acmDriverDetails)
MMRESULT WINAPI acmDriverEnum(
ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum
ACMDRIVERENUMCB fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
);
MMRESULT WINAPI acmDriverID(
HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID
@ -668,11 +676,11 @@ MMRESULT WINAPI acmFilterDetailsW(
MMRESULT WINAPI acmFilterEnumA(
HACMDRIVER had, PACMFILTERDETAILSA pafd,
ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
ACMFILTERENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
);
MMRESULT WINAPI acmFilterEnumW(
HACMDRIVER had, PACMFILTERDETAILSW pafd,
ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
ACMFILTERENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
);
#define acmFilterEnum WINELIB_NAME_AW(acmFilterEnum)
@ -686,11 +694,11 @@ MMRESULT WINAPI acmFilterTagDetailsW(
MMRESULT WINAPI acmFilterTagEnumA(
HACMDRIVER had, PACMFILTERTAGDETAILSA paftd,
ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
ACMFILTERTAGENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
);
MMRESULT WINAPI acmFilterTagEnumW(
HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
ACMFILTERTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
);
#define acmFilterTagEnum WINELIB_NAME_AW(acmFilterTagEnum)
@ -712,11 +720,11 @@ MMRESULT WINAPI acmFormatDetailsW(
MMRESULT WINAPI acmFormatEnumA(
HACMDRIVER had, PACMFORMATDETAILSA pafd,
ACMFORMATENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
ACMFORMATENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
);
MMRESULT WINAPI acmFormatEnumW(
HACMDRIVER had, PACMFORMATDETAILSW pafd,
ACMFORMATENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
);
#define acmFormatEnum WINELIB_NAME_AW(acmFormatEnum)
@ -734,11 +742,11 @@ MMRESULT WINAPI acmFormatTagDetailsW(
MMRESULT WINAPI acmFormatTagEnumA(
HACMDRIVER had, PACMFORMATTAGDETAILSA paftd,
ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
ACMFORMATTAGENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
);
MMRESULT WINAPI acmFormatTagEnumW(
HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
ACMFORMATTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
);
#define acmFormatTagEnum WINELIB_NAME_AW(acmFormatTagEnum)
@ -758,8 +766,8 @@ MMRESULT WINAPI acmStreamMessage(
);
MMRESULT WINAPI acmStreamOpen(
PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD dwCallback,
DWORD dwInstance, DWORD fdwOpen
PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD_PTR dwCallback,
DWORD_PTR dwInstance, DWORD fdwOpen
);
MMRESULT WINAPI acmStreamPrepareHeader(
HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define DLG_ACMFORMATCHOOSE_ID 70

File diff suppressed because it is too large Load diff

View file

@ -1,823 +0,0 @@
/*
* Declarations for MSACM
*
* Copyright (C) the Wine project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_MSACM_H
#define __WINE_MSACM_H
#include <mmreg.h>
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
#define ACMAPI WINAPI
/***********************************************************************
* Defines/Enums
*/
#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_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"
#if defined(__GNUC__)
# define ACMHELPMSGSTRINGW (const WCHAR []){ 'a','c','m', \
'c','h','o','o','s','e','_','h','e','l','p',0 }
#elif defined(_MSC_VER)
# define ACMHELPMSGSTRINGW L"acmchoose_help"
#else
static const WCHAR ACMHELPMSGSTRINGW[] = { 'a','c','m',
'c','h','o','o','s','e','_','h','e','l','p',0 };
#endif
#define ACMHELPMSGSTRING WINELIB_NAME_AW(ACMHELPMSGSTRING)
#define ACMHELPMSGCONTEXTMENUA "acmchoose_contextmenu"
#if defined(__GNUC__)
# define ACMHELPMSGCONTEXTMENUW (const WCHAR []){ 'a','c','m', \
'c','h','o','o','s','e','_','c','o','n','t','e','x','t','m','e','n','u',0 }
#elif defined(_MSC_VER)
# define ACMHELPMSGCONTEXTMENUW L"acmchoose_contextmenu"
#else
static const WCHAR ACMHELPMSGCONTEXTMENUW[] = { 'a','c','m',
'c','h','o','o','s','e','_','c','o','n','t','e','x','t','m','e','n','u',0 };
#endif
#define ACMHELPMSGCONTEXTMENU WINELIB_NAME_AW(ACMHELPMSGCONTEXTMENU)
#define ACMHELPMSGCONTEXTHELPA "acmchoose_contexthelp"
#if defined(__GNUC__)
# define ACMHELPMSGCONTEXTHELPW (const WCHAR []){ 'a','c','m', \
'c','h','o','o','s','e','_','c','o','n','t','e','x','t','h','e','l','p',0 }
#elif defined(_MSC_VER)
# define ACMHELPMSGCONTEXTHELPW L"acmchoose_contexthelp"
#else
static const WCHAR ACMHELPMSGCONTEXTHELPW[] = { 'a','c','m',
'c','h','o','o','s','e','_','c','o','n','t','e','x','t','h','e','l','p',0 };
#endif
#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)
/* handles */
DECLARE_HANDLE(HACMDRIVERID);
DECLARE_HANDLE(HACMDRIVER);
DECLARE_HANDLE(HACMSTREAM);
DECLARE_HANDLE(HACMOBJ);
typedef HACMDRIVERID *PHACMDRIVERID, *LPHACMDRIVERID;
typedef HACMDRIVER *PHACMDRIVER, *LPHACMDRIVER;
typedef HACMSTREAM *PHACMSTREAM, *LPHACMSTREAM;
typedef HACMOBJ *PHACMOBJ, *LPHACMOBJ;
/***********************************************************************
* Callbacks
*/
typedef BOOL (CALLBACK *ACMDRIVERENUMCB)(
HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport
);
typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCA)(
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
);
typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROCW)(
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
);
#define ACMFILTERCHOOSEHOOKPROC WINELIB_NAME_AW(ACMFILTERCHOOSEHOOKPROC)
typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCA)(
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
);
typedef UINT (CALLBACK *ACMFORMATCHOOSEHOOKPROCW)(
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
);
#define ACMFORMATCHOOSEHOOKPROC WINELIB_NAME_AW(ACMFORMATCHOOSEHOOKPROC)
/***********************************************************************
* Structures
*/
typedef struct _ACMDRIVERDETAILSA
{
DWORD cbStruct;
FOURCC fccType;
FOURCC fccComp;
WORD wMid;
WORD wPid;
DWORD vdwACM;
DWORD vdwDriver;
DWORD fdwSupport;
DWORD cFormatTags;
DWORD cFilterTags;
HICON hicon;
CHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
CHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
CHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
CHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
CHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
} ACMDRIVERDETAILSA, *PACMDRIVERDETAILSA, *LPACMDRIVERDETAILSA;
typedef struct _ACMDRIVERDETAILSW
{
DWORD cbStruct;
FOURCC fccType;
FOURCC fccComp;
WORD wMid;
WORD wPid;
DWORD vdwACM;
DWORD vdwDriver;
DWORD fdwSupport;
DWORD cFormatTags;
DWORD cFilterTags;
HICON hicon;
WCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
WCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
WCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
WCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
} ACMDRIVERDETAILSW, *PACMDRIVERDETAILSW, *LPACMDRIVERDETAILSW;
#if defined(UNICODE) || defined (_UNICODE)
typedef struct ACMDRIVERDETAILSW ACMDRIVERDETAILS;
typedef PACMDRIVERDETAILSW PACMDRIVERDETAILS;
typedef LPACMDRIVERDETAILSW LPACMDRIVERDETAILS;
#else
typedef struct ACMDRIVERDETAILSA ACMDRIVERDETAILS;
typedef PACMDRIVERDETAILSA PACMDRIVERDETAILS;
typedef LPACMDRIVERDETAILSA LPACMDRIVERDETAILS;
#endif
typedef struct _ACMFILTERCHOOSEA
{
DWORD cbStruct;
DWORD fdwStyle;
HWND hwndOwner;
PWAVEFILTER pwfltr;
DWORD cbwfltr;
LPCSTR pszTitle;
CHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
CHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
LPSTR pszName;
DWORD cchName;
DWORD fdwEnum;
PWAVEFILTER pwfltrEnum;
HINSTANCE hInstance;
LPCSTR pszTemplateName;
LPARAM lCustData;
ACMFILTERCHOOSEHOOKPROCA pfnHook;
} ACMFILTERCHOOSEA, *PACMFILTERCHOOSEA, *LPACMFILTERCHOOSEA;
typedef struct _ACMFILTERCHOOSEW
{
DWORD cbStruct;
DWORD fdwStyle;
HWND hwndOwner;
PWAVEFILTER pwfltr;
DWORD cbwfltr;
LPCWSTR pszTitle;
WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
LPWSTR pszName;
DWORD cchName;
DWORD fdwEnum;
PWAVEFILTER pwfltrEnum;
HINSTANCE hInstance;
LPCWSTR pszTemplateName;
LPARAM lCustData;
ACMFILTERCHOOSEHOOKPROCW pfnHook;
} ACMFILTERCHOOSEW, *PACMFILTERCHOOSEW, *LPACMFILTERCHOOSEW;
#if defined(UNICODE) || defined (_UNICODE)
typedef struct ACMFILTERCHOOSEW ACMFILTERCHOOSE;
typedef PACMFILTERCHOOSEW PACMFILTERCHOOSE;
typedef LPACMFILTERCHOOSEW LPACMFILTERCHOOSE;
#else
typedef struct ACMFILTERCHOOSEA ACMFILTERCHOOSE;
typedef PACMFILTERCHOOSEA PACMFILTERCHOOSE;
typedef LPACMFILTERCHOOSEA LPACMFILTERCHOOSE;
#endif
typedef struct _ACMFILTERDETAILSA
{
DWORD cbStruct;
DWORD dwFilterIndex;
DWORD dwFilterTag;
DWORD fdwSupport;
PWAVEFILTER pwfltr;
DWORD cbwfltr;
CHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
} ACMFILTERDETAILSA, *PACMFILTERDETAILSA, *LPACMFILTERDETAILSA;
typedef struct _ACMFILTERDETAILSW
{
DWORD cbStruct;
DWORD dwFilterIndex;
DWORD dwFilterTag;
DWORD fdwSupport;
PWAVEFILTER pwfltr;
DWORD cbwfltr;
WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
} ACMFILTERDETAILSW, *PACMFILTERDETAILSW, *LPACMFILTERDETAILSW;
#if defined(UNICODE) || defined (_UNICODE)
typedef struct ACMFILTERDETAILSW ACMFILTERDETAILS;
typedef PACMFILTERDETAILSW PACMFILTERDETAILS;
typedef LPACMFILTERDETAILSW LPACMFILTERDETAILS;
#else
typedef struct ACMFILTERDETAILSA ACMFILTERDETAILS;
typedef PACMFILTERDETAILSA PACMFILTERDETAILS;
typedef LPACMFILTERDETAILSA LPACMFILTERDETAILS;
#endif
typedef struct _ACMFILTERTAGDETAILSA
{
DWORD cbStruct;
DWORD dwFilterTagIndex;
DWORD dwFilterTag;
DWORD cbFilterSize;
DWORD fdwSupport;
DWORD cStandardFilters;
CHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
} ACMFILTERTAGDETAILSA, *PACMFILTERTAGDETAILSA, *LPACMFILTERTAGDETAILSA;
typedef struct _ACMFILTERTAGDETAILSW
{
DWORD cbStruct;
DWORD dwFilterTagIndex;
DWORD dwFilterTag;
DWORD cbFilterSize;
DWORD fdwSupport;
DWORD cStandardFilters;
WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
} ACMFILTERTAGDETAILSW, *PACMFILTERTAGDETAILSW, *LPACMFILTERTAGDETAILSW;
#if defined(UNICODE) || defined (_UNICODE)
typedef struct ACMFILTERTAGDETAILSW ACMFILTERTAGDETAILS;
typedef PACMFILTERTAGDETAILSW PACMFILTERTAGDETAILS;
typedef LPACMFILTERTAGDETAILSW LPACMFILTERTAGDETAILS;
#else
typedef struct ACMFILTERTAGDETAILSA ACMFILTERTAGDETAILS;
typedef PACMFILTERTAGDETAILSA PACMFILTERTAGDETAILS;
typedef LPACMFILTERTAGDETAILSA LPACMFILTERTAGDETAILS;
#endif
typedef struct _ACMFORMATCHOOSEA
{
DWORD cbStruct;
DWORD fdwStyle;
HWND hwndOwner;
PWAVEFORMATEX pwfx;
DWORD cbwfx;
LPCSTR pszTitle;
CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
LPSTR pszName;
DWORD cchName;
DWORD fdwEnum;
PWAVEFORMATEX pwfxEnum;
HINSTANCE hInstance;
LPCSTR pszTemplateName;
LPARAM lCustData;
ACMFORMATCHOOSEHOOKPROCA pfnHook;
} ACMFORMATCHOOSEA, *PACMFORMATCHOOSEA, *LPACMFORMATCHOOSEA;
typedef struct _ACMFORMATCHOOSEW
{
DWORD cbStruct;
DWORD fdwStyle;
HWND hwndOwner;
PWAVEFORMATEX pwfx;
DWORD cbwfx;
LPCWSTR pszTitle;
WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
LPWSTR pszName;
DWORD cchName;
DWORD fdwEnum;
LPWAVEFORMATEX pwfxEnum;
HINSTANCE hInstance;
LPCWSTR pszTemplateName;
LPARAM lCustData;
ACMFORMATCHOOSEHOOKPROCW pfnHook;
} ACMFORMATCHOOSEW, *PACMFORMATCHOOSEW, *LPACMFORMATCHOOSEW;
#if defined(UNICODE) || defined (_UNICODE)
typedef struct ACMFORMATCHOOSEW ACMFORMATCHOOSE;
typedef PACMFORMATCHOOSEW PACMFORMATCHOOSE;
typedef LPACMFORMATCHOOSEW LPACMFORMATCHOOSE;
#else
typedef struct ACMFORMATCHOOSEA ACMFORMATCHOOSE;
typedef PACMFORMATCHOOSEA PACMFORMATCHOOSE;
typedef LPACMFORMATCHOOSEA LPACMFORMATCHOOSE;
#endif
typedef struct _ACMFORMATDETAILSA
{
DWORD cbStruct;
DWORD dwFormatIndex;
DWORD dwFormatTag;
DWORD fdwSupport;
PWAVEFORMATEX pwfx;
DWORD cbwfx;
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
} ACMFORMATDETAILSA, *PACMFORMATDETAILSA, *LPACMFORMATDETAILSA;
typedef struct _ACMFORMATDETAILSW
{
DWORD cbStruct;
DWORD dwFormatIndex;
DWORD dwFormatTag;
DWORD fdwSupport;
PWAVEFORMATEX pwfx;
DWORD cbwfx;
WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
} ACMFORMATDETAILSW, *PACMFORMATDETAILSW, *LPACMFORMATDETAILSW;
#if defined(UNICODE) || defined (_UNICODE)
typedef struct ACMFORMATDETAILSW ACMFORMATDETAILS;
typedef PACMFORMATDETAILSW PACMFORMATDETAILS;
typedef LPACMFORMATDETAILSW LPACMFORMATDETAILS;
#else
typedef struct ACMFORMATDETAILSA ACMFORMATDETAILS;
typedef PACMFORMATDETAILSA PACMFORMATDETAILS;
typedef LPACMFORMATDETAILSA LPACMFORMATDETAILS;
#endif
typedef struct _ACMFORMATTAGDETAILSA
{
DWORD cbStruct;
DWORD dwFormatTagIndex;
DWORD dwFormatTag;
DWORD cbFormatSize;
DWORD fdwSupport;
DWORD cStandardFormats;
CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
} ACMFORMATTAGDETAILSA, *PACMFORMATTAGDETAILSA, *LPACMFORMATTAGDETAILSA;
typedef struct _ACMFORMATTAGDETAILSW
{
DWORD cbStruct;
DWORD dwFormatTagIndex;
DWORD dwFormatTag;
DWORD cbFormatSize;
DWORD fdwSupport;
DWORD cStandardFormats;
WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
} ACMFORMATTAGDETAILSW, *PACMFORMATTAGDETAILSW, *LPACMFORMATTAGDETAILSW;
#if defined(UNICODE) || defined (_UNICODE)
typedef struct ACMFORMATTAGDETAILSW ACMFORMATTAGDETAILS;
typedef PACMFORMATTAGDETAILSW PACMFORMATTAGDETAILS;
typedef LPACMFORMATTAGDETAILSW LPACMFORMATTAGDETAILS;
#else
typedef struct ACMFORMATTAGDETAILSA ACMFORMATTAGDETAILS;
typedef PACMFORMATTAGDETAILSA PACMFORMATTAGDETAILS;
typedef LPACMFORMATTAGDETAILSA LPACMFORMATTAGDETAILS;
#endif
typedef struct _ACMSTREAMHEADER
{
DWORD cbStruct;
DWORD fdwStatus;
DWORD dwUser;
LPBYTE pbSrc;
DWORD cbSrcLength;
DWORD cbSrcLengthUsed;
DWORD dwSrcUser;
LPBYTE pbDst;
DWORD cbDstLength;
DWORD cbDstLengthUsed;
DWORD dwDstUser;
DWORD dwReservedDriver[10];
} ACMSTREAMHEADER, *PACMSTREAMHEADER, *LPACMSTREAMHEADER;
/***********************************************************************
* Callbacks 2
*/
typedef BOOL (CALLBACK *ACMFILTERENUMCBA)(
HACMDRIVERID hadid, PACMFILTERDETAILSA pafd,
DWORD dwInstance, DWORD fdwSupport
);
typedef BOOL (CALLBACK *ACMFILTERENUMCBW)(
HACMDRIVERID hadid, PACMFILTERDETAILSW pafd,
DWORD dwInstance, DWORD fdwSupport
);
#define ACMFILTERENUMCB WINELIB_NAME_AW(ACMFILTERENUMCB)
typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBA)(
HACMDRIVERID hadid, PACMFILTERTAGDETAILSA paftd,
DWORD dwInstance, DWORD fdwSupport
);
typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBW)(
HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftd,
DWORD dwInstance, DWORD fdwSupport
);
#define ACMFILTERTAGENUMCB WINELIB_NAME_AW(ACMFILTERTAGENUMCB)
typedef BOOL (CALLBACK *ACMFORMATENUMCBA)(
HACMDRIVERID hadid, PACMFORMATDETAILSA pafd,
DWORD dwInstance, DWORD fdwSupport
);
typedef BOOL (CALLBACK *ACMFORMATENUMCBW)(
HACMDRIVERID hadid, PACMFORMATDETAILSW pafd,
DWORD dwInstance, DWORD fdwSupport
);
#define ACMFORMATENUMCB WINELIB_NAME_AW(ACMFORMATENUMCB)
typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBA)(
HACMDRIVERID hadid, PACMFORMATTAGDETAILSA paftd,
DWORD dwInstance, DWORD fdwSupport
);
typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBW)(
HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftd,
DWORD dwInstance, DWORD fdwSupport
);
#define ACMFORMATTAGENUMCB WINELIB_NAME_AW(ACMFORMATTAGENUMCB)
/***********************************************************************
* Functions - Win32
*/
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
);
#define acmDriverAdd WINELIB_NAME_AW(acmDriverAdd)
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
);
#define acmDriverDetails WINELIB_NAME_AW(acmDriverDetails)
MMRESULT WINAPI acmDriverEnum(
ACMDRIVERENUMCB fnCallback, DWORD 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
);
#define acmFilterChoose WINELIB_NAME_AW(acmFilterChoose)
MMRESULT WINAPI acmFilterDetailsA(
HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails
);
MMRESULT WINAPI acmFilterDetailsW(
HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails
);
#define acmFilterDetails WINELIB_NAME_AW(acmFilterDetails)
MMRESULT WINAPI acmFilterEnumA(
HACMDRIVER had, PACMFILTERDETAILSA pafd,
ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
);
MMRESULT WINAPI acmFilterEnumW(
HACMDRIVER had, PACMFILTERDETAILSW pafd,
ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
);
#define acmFilterEnum WINELIB_NAME_AW(acmFilterEnum)
MMRESULT WINAPI acmFilterTagDetailsA(
HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, DWORD fdwDetails
);
MMRESULT WINAPI acmFilterTagDetailsW(
HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails
);
#define acmFilterTagDetails WINELIB_NAME_AW(acmFilterTagDetails)
MMRESULT WINAPI acmFilterTagEnumA(
HACMDRIVER had, PACMFILTERTAGDETAILSA paftd,
ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
);
MMRESULT WINAPI acmFilterTagEnumW(
HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
);
#define acmFilterTagEnum WINELIB_NAME_AW(acmFilterTagEnum)
MMRESULT WINAPI acmFormatChooseA(
PACMFORMATCHOOSEA pafmtc
);
MMRESULT WINAPI acmFormatChooseW(
PACMFORMATCHOOSEW pafmtc
);
#define acmFormatChoose WINELIB_NAME_AW(acmFormatChoose)
MMRESULT WINAPI acmFormatDetailsA(
HACMDRIVER had, PACMFORMATDETAILSA pafd, DWORD fdwDetails
);
MMRESULT WINAPI acmFormatDetailsW(
HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails
);
#define acmFormatDetails WINELIB_NAME_AW(acmFormatDetails)
MMRESULT WINAPI acmFormatEnumA(
HACMDRIVER had, PACMFORMATDETAILSA pafd,
ACMFORMATENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
);
MMRESULT WINAPI acmFormatEnumW(
HACMDRIVER had, PACMFORMATDETAILSW pafd,
ACMFORMATENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
);
#define acmFormatEnum WINELIB_NAME_AW(acmFormatEnum)
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
);
#define acmFormatTagDetails WINELIB_NAME_AW(acmFormatTagDetails)
MMRESULT WINAPI acmFormatTagEnumA(
HACMDRIVER had, PACMFORMATTAGDETAILSA paftd,
ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
);
MMRESULT WINAPI acmFormatTagEnumW(
HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
);
#define acmFormatTagEnum WINELIB_NAME_AW(acmFormatTagEnum)
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 dwCallback,
DWORD 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
);
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */
#endif /* __WINE_MSACM_H */

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_MSACMDRV_H
@ -24,10 +24,10 @@
#include <stdarg.h>
#include <windef.h>
#include "winbase.h"
#include "mmsystem.h"
#include "mmreg.h"
#include "msacm.h"
#include <winbase.h>
#include <mmsystem.h>
#include <mmreg.h>
#include <msacm.h>
/***********************************************************************
* Types
@ -38,7 +38,7 @@
*/
#define MAKE_ACM_VERSION(mjr, mnr, bld) \
(((long)(mjr)<<24) | ((long)(mnr)<<16) | ((long)bld))
(((LONG)(mjr)<<24) | ((LONG)(mnr)<<16) | ((LONG)bld))
#define ACMDRVOPENDESC_SECTIONNAME_CHARS
@ -100,40 +100,40 @@ typedef struct _ACMDRVSTREAMINSTANCE
PWAVEFORMATEX pwfxSrc;
PWAVEFORMATEX pwfxDst;
PWAVEFILTER pwfltr;
DWORD dwCallback;
DWORD dwInstance;
DWORD_PTR dwCallback;
DWORD_PTR dwInstance;
DWORD fdwOpen;
DWORD fdwDriver;
DWORD dwDriver;
DWORD_PTR dwDriver;
HACMSTREAM has;
} ACMDRVSTREAMINSTANCE, *PACMDRVSTREAMINSTANCE;
typedef struct _ACMDRVSTREAMHEADER *PACMDRVSTREAMHEADER;
typedef struct _ACMDRVSTREAMHEADER {
DWORD cbStruct;
DWORD fdwStatus;
DWORD dwUser;
LPBYTE pbSrc;
DWORD cbSrcLength;
DWORD cbSrcLengthUsed;
DWORD dwSrcUser;
LPBYTE pbDst;
DWORD cbDstLength;
DWORD cbDstLengthUsed;
DWORD dwDstUser;
DWORD cbStruct;
DWORD fdwStatus;
DWORD_PTR dwUser;
LPBYTE pbSrc;
DWORD cbSrcLength;
DWORD cbSrcLengthUsed;
DWORD_PTR dwSrcUser;
LPBYTE pbDst;
DWORD cbDstLength;
DWORD cbDstLengthUsed;
DWORD_PTR dwDstUser;
DWORD fdwConvert;
DWORD fdwConvert;
PACMDRVSTREAMHEADER *padshNext;
DWORD fdwDriver;
DWORD dwDriver;
DWORD fdwDriver;
DWORD_PTR dwDriver;
/* Internal fields for ACM */
DWORD fdwPrepared;
DWORD dwPrepared;
LPBYTE pbPreparedSrc;
DWORD cbPreparedSrcLength;
LPBYTE pbPreparedDst;
DWORD cbPreparedDstLength;
DWORD fdwPrepared;
DWORD_PTR dwPrepared;
LPBYTE pbPreparedSrc;
DWORD cbPreparedSrcLength;
LPBYTE pbPreparedDst;
DWORD cbPreparedDstLength;
} ACMDRVSTREAMHEADER;
typedef struct _ACMDRVSTREAMSIZE