[MMDEVAPI]

* Import from Wine 1.7.1. Dedicated to Johannes Anderwald.
CORE-7469

svn path=/trunk/; revision=60476
This commit is contained in:
Amine Khaldi 2013-09-30 13:32:32 +00:00
parent 5dbec815ce
commit f225fe10dd
19 changed files with 3588 additions and 0 deletions

View file

@ -82,6 +82,7 @@ add_subdirectory(mciqtz32)
add_subdirectory(mciseq)
add_subdirectory(mciwave)
add_subdirectory(mlang)
add_subdirectory(mmdevapi)
add_subdirectory(mmdrv)
add_subdirectory(modemui)
add_subdirectory(mpr)

View file

@ -0,0 +1,20 @@
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
add_definitions(-D__WINESRC__)
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(mmdevapi.dll mmdevapi.spec ADD_IMPORTLIB)
list(APPEND SOURCE
audiovolume.c
devenum.c
main.c
${CMAKE_CURRENT_BINARY_DIR}/mmdevapi_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/mmdevapi.def)
add_library(mmdevapi SHARED ${SOURCE} mmdevapi.rc)
set_module_type(mmdevapi win32dll)
target_link_libraries(mmdevapi uuid wine)
add_importlibs(mmdevapi ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll)
add_cd_file(TARGET mmdevapi DESTINATION reactos/system32 FOR all)

View file

@ -0,0 +1,290 @@
/*
* Copyright 2010 Maarten Lankhorst for CodeWeavers
*
* 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
*/
#define NONAMELESSUNION
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winreg.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "ole2.h"
#include "mmdeviceapi.h"
#include "mmsystem.h"
#include "dsound.h"
#include "audioclient.h"
#include "endpointvolume.h"
#include "audiopolicy.h"
#include "mmdevapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(mmdevapi);
static const IAudioEndpointVolumeExVtbl AEVImpl_Vtbl;
typedef struct AEVImpl {
IAudioEndpointVolumeEx IAudioEndpointVolumeEx_iface;
LONG ref;
} AEVImpl;
static inline AEVImpl *impl_from_IAudioEndpointVolumeEx(IAudioEndpointVolumeEx *iface)
{
return CONTAINING_RECORD(iface, AEVImpl, IAudioEndpointVolumeEx_iface);
}
HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolume **ppv)
{
AEVImpl *This;
This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*This));
*ppv = (IAudioEndpointVolume*)This;
if (!This)
return E_OUTOFMEMORY;
This->IAudioEndpointVolumeEx_iface.lpVtbl = &AEVImpl_Vtbl;
This->ref = 1;
return S_OK;
}
static void AudioEndpointVolume_Destroy(AEVImpl *This)
{
HeapFree(GetProcessHeap(), 0, This);
}
static HRESULT WINAPI AEV_QueryInterface(IAudioEndpointVolumeEx *iface, REFIID riid, void **ppv)
{
AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
if (!ppv)
return E_POINTER;
*ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IAudioEndpointVolume) ||
IsEqualIID(riid, &IID_IAudioEndpointVolumeEx)) {
*ppv = This;
}
else
return E_NOINTERFACE;
IUnknown_AddRef((IUnknown *)*ppv);
return S_OK;
}
static ULONG WINAPI AEV_AddRef(IAudioEndpointVolumeEx *iface)
{
AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) new ref %u\n", This, ref);
return ref;
}
static ULONG WINAPI AEV_Release(IAudioEndpointVolumeEx *iface)
{
AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) new ref %u\n", This, ref);
if (!ref)
AudioEndpointVolume_Destroy(This);
return ref;
}
static HRESULT WINAPI AEV_RegisterControlChangeNotify(IAudioEndpointVolumeEx *iface, IAudioEndpointVolumeCallback *notify)
{
TRACE("(%p)->(%p)\n", iface, notify);
if (!notify)
return E_POINTER;
FIXME("stub\n");
return S_OK;
}
static HRESULT WINAPI AEV_UnregisterControlChangeNotify(IAudioEndpointVolumeEx *iface, IAudioEndpointVolumeCallback *notify)
{
TRACE("(%p)->(%p)\n", iface, notify);
if (!notify)
return E_POINTER;
FIXME("stub\n");
return S_OK;
}
static HRESULT WINAPI AEV_GetChannelCount(IAudioEndpointVolumeEx *iface, UINT *count)
{
TRACE("(%p)->(%p)\n", iface, count);
if (!count)
return E_POINTER;
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_SetMasterVolumeLevel(IAudioEndpointVolumeEx *iface, float leveldb, const GUID *ctx)
{
TRACE("(%p)->(%f,%s)\n", iface, leveldb, debugstr_guid(ctx));
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_SetMasterVolumeLevelScalar(IAudioEndpointVolumeEx *iface, float level, const GUID *ctx)
{
TRACE("(%p)->(%f,%s)\n", iface, level, debugstr_guid(ctx));
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_GetMasterVolumeLevel(IAudioEndpointVolumeEx *iface, float *leveldb)
{
TRACE("(%p)->(%p)\n", iface, leveldb);
if (!leveldb)
return E_POINTER;
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_GetMasterVolumeLevelScalar(IAudioEndpointVolumeEx *iface, float *level)
{
TRACE("(%p)->(%p)\n", iface, level);
if (!level)
return E_POINTER;
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_SetChannelVolumeLevel(IAudioEndpointVolumeEx *iface, UINT chan, float leveldb, const GUID *ctx)
{
TRACE("(%p)->(%f,%s)\n", iface, leveldb, debugstr_guid(ctx));
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_SetChannelVolumeLevelScalar(IAudioEndpointVolumeEx *iface, UINT chan, float level, const GUID *ctx)
{
TRACE("(%p)->(%u,%f,%s)\n", iface, chan, level, debugstr_guid(ctx));
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_GetChannelVolumeLevel(IAudioEndpointVolumeEx *iface, UINT chan, float *leveldb)
{
TRACE("(%p)->(%u,%p)\n", iface, chan, leveldb);
if (!leveldb)
return E_POINTER;
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_GetChannelVolumeLevelScalar(IAudioEndpointVolumeEx *iface, UINT chan, float *level)
{
TRACE("(%p)->(%u,%p)\n", iface, chan, level);
if (!level)
return E_POINTER;
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_SetMute(IAudioEndpointVolumeEx *iface, BOOL mute, const GUID *ctx)
{
TRACE("(%p)->(%u,%s)\n", iface, mute, debugstr_guid(ctx));
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_GetMute(IAudioEndpointVolumeEx *iface, BOOL *mute)
{
TRACE("(%p)->(%p)\n", iface, mute);
if (!mute)
return E_POINTER;
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_GetVolumeStepInfo(IAudioEndpointVolumeEx *iface, UINT *stepsize, UINT *stepcount)
{
TRACE("(%p)->(%p,%p)\n", iface, stepsize, stepcount);
if (!stepsize && !stepcount)
return E_POINTER;
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_VolumeStepUp(IAudioEndpointVolumeEx *iface, const GUID *ctx)
{
TRACE("(%p)->(%s)\n", iface, debugstr_guid(ctx));
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_VolumeStepDown(IAudioEndpointVolumeEx *iface, const GUID *ctx)
{
TRACE("(%p)->(%s)\n", iface, debugstr_guid(ctx));
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_QueryHardwareSupport(IAudioEndpointVolumeEx *iface, DWORD *mask)
{
TRACE("(%p)->(%p)\n", iface, mask);
if (!mask)
return E_POINTER;
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_GetVolumeRange(IAudioEndpointVolumeEx *iface, float *mindb, float *maxdb, float *inc)
{
TRACE("(%p)->(%p,%p,%p)\n", iface, mindb, maxdb, inc);
if (!mindb || !maxdb || !inc)
return E_POINTER;
FIXME("stub\n");
return E_NOTIMPL;
}
static HRESULT WINAPI AEV_GetVolumeRangeChannel(IAudioEndpointVolumeEx *iface, UINT chan, float *mindb, float *maxdb, float *inc)
{
TRACE("(%p)->(%p,%p,%p)\n", iface, mindb, maxdb, inc);
if (!mindb || !maxdb || !inc)
return E_POINTER;
FIXME("stub\n");
return E_NOTIMPL;
}
static const IAudioEndpointVolumeExVtbl AEVImpl_Vtbl = {
AEV_QueryInterface,
AEV_AddRef,
AEV_Release,
AEV_RegisterControlChangeNotify,
AEV_UnregisterControlChangeNotify,
AEV_GetChannelCount,
AEV_SetMasterVolumeLevel,
AEV_SetMasterVolumeLevelScalar,
AEV_GetMasterVolumeLevel,
AEV_GetMasterVolumeLevelScalar,
AEV_SetChannelVolumeLevel,
AEV_SetChannelVolumeLevelScalar,
AEV_GetChannelVolumeLevel,
AEV_GetChannelVolumeLevelScalar,
AEV_SetMute,
AEV_GetMute,
AEV_GetVolumeStepInfo,
AEV_VolumeStepUp,
AEV_VolumeStepDown,
AEV_QueryHardwareSupport,
AEV_GetVolumeRange,
AEV_GetVolumeRangeChannel
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,326 @@
/*
* Copyright 2009 Maarten Lankhorst
* Copyright 2011 Andrew Eikum for CodeWeavers
*
* 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 "config.h"
#include "wine/port.h"
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "wine/library.h"
#include "ole2.h"
#include "olectl.h"
#include "rpcproxy.h"
#include "propsys.h"
#include "propkeydef.h"
#include "mmdeviceapi.h"
#include "mmsystem.h"
#include "dsound.h"
#include "audioclient.h"
#include "endpointvolume.h"
#include "audiopolicy.h"
#include "devpkey.h"
#include "winreg.h"
#include "mmdevapi.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(mmdevapi);
static HINSTANCE instance;
DriverFuncs drvs;
const WCHAR drv_keyW[] = {'S','o','f','t','w','a','r','e','\\',
'W','i','n','e','\\','D','r','i','v','e','r','s',0};
static const char *get_priority_string(int prio)
{
switch(prio){
case Priority_Unavailable:
return "Unavailable";
case Priority_Low:
return "Low";
case Priority_Neutral:
return "Neutral";
case Priority_Preferred:
return "Preferred";
}
return "Invalid";
}
static BOOL load_driver(const WCHAR *name, DriverFuncs *driver)
{
WCHAR driver_module[264];
static const WCHAR wineW[] = {'w','i','n','e',0};
static const WCHAR dotdrvW[] = {'.','d','r','v',0};
lstrcpyW(driver_module, wineW);
lstrcatW(driver_module, name);
lstrcatW(driver_module, dotdrvW);
TRACE("Attempting to load %s\n", wine_dbgstr_w(driver_module));
driver->module = LoadLibraryW(driver_module);
if(!driver->module){
TRACE("Unable to load %s: %u\n", wine_dbgstr_w(driver_module),
GetLastError());
return FALSE;
}
#define LDFC(n) do { driver->p##n = (void*)GetProcAddress(driver->module, #n);\
if(!driver->p##n) { FreeLibrary(driver->module); return FALSE; } } while(0)
LDFC(GetPriority);
LDFC(GetEndpointIDs);
LDFC(GetAudioEndpoint);
LDFC(GetAudioSessionManager);
#undef LDFC
driver->priority = driver->pGetPriority();
lstrcpyW(driver->module_name, driver_module);
TRACE("Successfully loaded %s with priority %s\n",
wine_dbgstr_w(driver_module), get_priority_string(driver->priority));
return TRUE;
}
static BOOL init_driver(void)
{
static const WCHAR drv_value[] = {'A','u','d','i','o',0};
static WCHAR default_list[] = {'a','l','s','a',',','o','s','s',',',
'c','o','r','e','a','u','d','i','o',0};
DriverFuncs driver;
HKEY key;
WCHAR reg_list[256], *p, *next, *driver_list = default_list;
if(drvs.module)
return TRUE;
if(RegOpenKeyW(HKEY_CURRENT_USER, drv_keyW, &key) == ERROR_SUCCESS){
DWORD size = sizeof(reg_list);
if(RegQueryValueExW(key, drv_value, 0, NULL, (BYTE*)reg_list,
&size) == ERROR_SUCCESS){
if(reg_list[0] == '\0'){
TRACE("User explicitly chose no driver\n");
RegCloseKey(key);
return TRUE;
}
driver_list = reg_list;
}
RegCloseKey(key);
}
TRACE("Loading driver list %s\n", wine_dbgstr_w(driver_list));
for(next = p = driver_list; next; p = next + 1){
next = strchrW(p, ',');
if(next)
*next = '\0';
driver.priority = Priority_Unavailable;
if(load_driver(p, &driver)){
if(driver.priority == Priority_Unavailable)
FreeLibrary(driver.module);
else if(!drvs.module || driver.priority > drvs.priority){
TRACE("Selecting driver %s with priority %s\n",
wine_dbgstr_w(p), get_priority_string(driver.priority));
if(drvs.module)
FreeLibrary(drvs.module);
drvs = driver;
}else
FreeLibrary(driver.module);
}else
TRACE("Failed to load driver %s\n", wine_dbgstr_w(p));
if(next)
*next = ',';
}
return drvs.module != 0;
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
instance = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
break;
case DLL_PROCESS_DETACH:
if(lpvReserved)
break;
MMDevEnum_Free();
break;
}
return TRUE;
}
HRESULT WINAPI DllCanUnloadNow(void)
{
return S_FALSE;
}
typedef HRESULT (*FnCreateInstance)(REFIID riid, LPVOID *ppobj);
typedef struct {
IClassFactory IClassFactory_iface;
REFCLSID rclsid;
FnCreateInstance pfnCreateInstance;
} IClassFactoryImpl;
static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
{
return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
}
static HRESULT WINAPI
MMCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppobj)
{
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
if (ppobj == NULL)
return E_POINTER;
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IClassFactory))
{
*ppobj = iface;
IClassFactory_AddRef(iface);
return S_OK;
}
*ppobj = NULL;
return E_NOINTERFACE;
}
static ULONG WINAPI MMCF_AddRef(LPCLASSFACTORY iface)
{
return 2;
}
static ULONG WINAPI MMCF_Release(LPCLASSFACTORY iface)
{
/* static class, won't be freed */
return 1;
}
static HRESULT WINAPI MMCF_CreateInstance(
LPCLASSFACTORY iface,
LPUNKNOWN pOuter,
REFIID riid,
LPVOID *ppobj)
{
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
TRACE("(%p, %p, %s, %p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (pOuter)
return CLASS_E_NOAGGREGATION;
if (ppobj == NULL) {
WARN("invalid parameter\n");
return E_POINTER;
}
*ppobj = NULL;
return This->pfnCreateInstance(riid, ppobj);
}
static HRESULT WINAPI MMCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
{
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
FIXME("(%p, %d) stub!\n", This, dolock);
return S_OK;
}
static const IClassFactoryVtbl MMCF_Vtbl = {
MMCF_QueryInterface,
MMCF_AddRef,
MMCF_Release,
MMCF_CreateInstance,
MMCF_LockServer
};
static IClassFactoryImpl MMDEVAPI_CF[] = {
{ { &MMCF_Vtbl }, &CLSID_MMDeviceEnumerator, (FnCreateInstance)MMDevEnum_Create }
};
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
unsigned int i = 0;
TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if(!init_driver()){
ERR("Driver initialization failed\n");
return E_FAIL;
}
if (ppv == NULL) {
WARN("invalid parameter\n");
return E_INVALIDARG;
}
*ppv = NULL;
if (!IsEqualIID(riid, &IID_IClassFactory) &&
!IsEqualIID(riid, &IID_IUnknown)) {
WARN("no interface for %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
}
for (i = 0; i < sizeof(MMDEVAPI_CF)/sizeof(MMDEVAPI_CF[0]); ++i)
{
if (IsEqualGUID(rclsid, MMDEVAPI_CF[i].rclsid)) {
IClassFactory_AddRef(&MMDEVAPI_CF[i].IClassFactory_iface);
*ppv = &MMDEVAPI_CF[i];
return S_OK;
}
i++;
}
WARN("(%s, %s, %p): no class found.\n", debugstr_guid(rclsid),
debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
/***********************************************************************
* DllRegisterServer (MMDEVAPI.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance );
}
/***********************************************************************
* DllUnregisterServer (MMDEVAPI.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( instance );
}

View file

@ -0,0 +1,77 @@
/*
* Copyright 2009 Maarten Lankhorst
*
* 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
*/
#ifndef __WINE_CONFIG_H
# error You must include config.h to use this header
#endif
extern HRESULT MMDevEnum_Create(REFIID riid, void **ppv) DECLSPEC_HIDDEN;
extern void MMDevEnum_Free(void) DECLSPEC_HIDDEN;
/* Changes to this enum must be synced in drivers. */
enum _DriverPriority {
Priority_Unavailable = 0, /* driver won't work */
Priority_Low, /* driver may work, but unlikely */
Priority_Neutral, /* driver makes no judgment */
Priority_Preferred /* driver thinks it's correct */
};
typedef struct _DriverFuncs {
HMODULE module;
WCHAR module_name[64];
int priority;
/* Returns a "priority" value for the driver. Highest priority wins.
* If multiple drivers think they are valid, they will return a
* priority value reflecting the likelihood that they are actually
* valid. See enum _DriverPriority. */
int (WINAPI *pGetPriority)(void);
/* ids gets an array of human-friendly endpoint names
* keys gets an array of driver-specific stuff that is used
* in GetAudioEndpoint to identify the endpoint
* it is the caller's responsibility to free both arrays, and
* all of the elements in both arrays with HeapFree() */
HRESULT (WINAPI *pGetEndpointIDs)(EDataFlow flow, WCHAR ***ids,
GUID **guids, UINT *num, UINT *default_index);
HRESULT (WINAPI *pGetAudioEndpoint)(void *key, IMMDevice *dev,
IAudioClient **out);
HRESULT (WINAPI *pGetAudioSessionManager)(IMMDevice *device,
IAudioSessionManager2 **out);
} DriverFuncs;
extern DriverFuncs drvs DECLSPEC_HIDDEN;
typedef struct MMDevice {
IMMDevice IMMDevice_iface;
IMMEndpoint IMMEndpoint_iface;
LONG ref;
CRITICAL_SECTION crst;
EDataFlow flow;
DWORD state;
GUID devguid;
WCHAR *drv_id;
} MMDevice;
extern HRESULT AudioClient_Create(MMDevice *parent, IAudioClient **ppv) DECLSPEC_HIDDEN;
extern HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolume **ppv) DECLSPEC_HIDDEN;
extern const WCHAR drv_keyW[] DECLSPEC_HIDDEN;

View file

@ -0,0 +1 @@
1 WINE_REGISTRY mmdevapi_classes.rgs

View file

@ -0,0 +1,19 @@
2 stub MMDEVAPI_2
3 stub MMDEVAPI_3
4 stub MMDEVAPI_4
5 stub MMDEVAPI_5
6 stub MMDEVAPI_6
7 stub MMDEVAPI_7
8 stub MMDEVAPI_8
9 stub MMDEVAPI_9
10 stub MMDEVAPI_10
11 stub MMDEVAPI_11
12 stub MMDEVAPI_12
13 stub MMDEVAPI_13
14 stub MMDEVAPI_14
15 stub MMDEVAPI_15
@ stdcall -private DllCanUnloadNow()
@ stdcall -private DllGetClassObject( ptr ptr ptr )
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()

View file

@ -0,0 +1,26 @@
/*
* COM Classes for mmdevapi
*
* Copyright 2010 Alexandre Julliard
*
* 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
*/
[
helpstring("MMDeviceEnumerator class"),
threading(both),
uuid(bcde0395-e52f-467c-8e3d-c4579291692e)
]
coclass MMDeviceEnumerator { interface IMMDeviceEnumerator; }

View file

@ -0,0 +1,13 @@
HKCR
{
NoRemove Interface
{
}
NoRemove CLSID
{
'{BCDE0395-E52F-467C-8E3D-C4579291692E}' = s 'MMDeviceEnumerator class'
{
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
}
}
}

View file

@ -13,6 +13,7 @@ list(APPEND SOURCE
# asysta.idl
atliface.idl
audioclient.idl
audiopolicy.idl
bdaiface.idl
# binres.idl
bits.idl
@ -33,6 +34,7 @@ list(APPEND SOURCE
# dbprop.idl
# dbs.idl
devenum.idl
devicetopology.idl
dimm.idl
dispex.idl
docobj.idl
@ -40,6 +42,7 @@ list(APPEND SOURCE
downloadmgr.idl
dxgi.idl
# dyngraph.idl
endpointvolume.idl
exdisp.idl
fusion.idl
hlink.idl

View file

@ -0,0 +1,240 @@
/*
* Core Audio audio policy definitions
*
* Copyright 2009 Maarten Lankhorst
*
* 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
*
*/
import "oaidl.idl";
import "ocidl.idl";
import "propidl.idl";
import "audiosessiontypes.h";
import "audioclient.idl";
interface IAudioSessionEvents;
interface IAudioSessionControl;
interface IAudioSessionControl2;
interface IAudioSessionManager;
interface IAudioVolumeDuckNotification;
interface IAudioSessionNotification;
interface IAudioSessionEnumerator;
interface IAudioSessionManager2;
typedef enum AudioSessionDisconnectReason /*[local]*/
{
DisconnectReasonDeviceRemoval = 0,
DisconnectReasonServerShutdown,
DisconnectReasonFormatChanged,
DisconnectReasonSessionLogoff,
DisconnectReasonSessionDisconnected,
DisconnectReasonExclusiveModeOverride,
} AudioSessionDisconnectReason;
[
local,
uuid(24918acc-64b3-37c1-8ca9-74a66e9957a8),
pointer_default(unique),
object
]
interface IAudioSessionEvents : IUnknown
{
HRESULT OnDisplayNameChanged(
[string,in] LPCWSTR NewDisplayName,
[in] LPCGUID EventContext
);
HRESULT OnIconPathChanged(
[string,in] LPCWSTR NewIconPath,
[in] LPCGUID EventContext
);
HRESULT OnSimpleVolumeChanged(
[in] float NewVolume,
[in] BOOL NewMute,
[in] LPCGUID EventContext
);
HRESULT OnChannelVolumeChanged(
[in] DWORD ChannelCount,
[size_is(ChannelCount),in] float *NewChannelVolumeArray,
[in] DWORD ChangedChannel,
[in] LPCGUID EventContext
);
HRESULT OnGroupingParamChanged(
[in] LPCGUID NewGroupingParam,
[in] LPCGUID EventContext
);
HRESULT OnStateChanged(
[in] AudioSessionState NewState
);
HRESULT OnSessionDisconnected(
[in] AudioSessionDisconnectReason DisconnectReason
);
}
[
local,
uuid(f4b1a599-7266-4319-a8ca-e70acb11e8cd),
pointer_default(unique),
object
]
interface IAudioSessionControl : IUnknown
{
HRESULT GetState(
[out] AudioSessionState *pRetVal
);
HRESULT GetDisplayName(
[string,out] LPWSTR *pRetVal
);
HRESULT SetDisplayName(
[string,in] LPCWSTR DisplayName,
[unique,in] LPCGUID EventContext
);
HRESULT GetIconPath(
[string,out] LPWSTR *pRetVal
);
HRESULT SetIconPath(
[string,in] LPCWSTR Value,
[unique,in] LPCGUID EventContext
);
HRESULT GetGroupingParam(
[out] GUID *pRetVal
);
HRESULT SetGroupingParam(
[in] LPCGUID Override,
[unique,in] LPCGUID EventContext
);
HRESULT RegisterAudioSessionNotification(
[in] IAudioSessionEvents *NewNotifications
);
HRESULT UnregisterAudioSessionNotification(
[in] IAudioSessionEvents *NewNotifications
);
}
[
local,
uuid(bfb7ff88-7239-4fc9-8fa2-07c950be9c6d),
pointer_default(unique),
object
]
interface IAudioSessionControl2 : IAudioSessionControl
{
HRESULT GetSessionIdentifier(
[string,out] LPWSTR *pRetVal
);
HRESULT GetSessionInstanceIdentifier(
[string,out] LPWSTR *pRetVal
);
HRESULT GetProcessId(
[out] DWORD *pRetVal
);
HRESULT IsSystemSoundsSession(void);
HRESULT SetDuckingPreferences(
[in] BOOL optOut
);
};
[
local,
uuid(bfa971f1-4d5e-40bb-935e-967039bfbee4),
pointer_default(unique),
object
]
interface IAudioSessionManager : IUnknown
{
HRESULT GetAudioSessionControl(
[in] LPCGUID AudioSessionGuid,
[in] DWORD StreamFlags,
[out] IAudioSessionControl **SessionControl
);
HRESULT GetSimpleAudioVolume(
[in] LPCGUID AudioSessionGuid,
[in] DWORD StreamFlags,
[out] ISimpleAudioVolume **AudioVolume
);
};
[
local,
uuid(c3b284d4-6d39-4359-b3cf-b56ddb3bb39c),
pointer_default(unique),
object
]
interface IAudioVolumeDuckNotification : IUnknown
{
HRESULT OnVolumeDuckNotification(
[in] LPCWSTR sessionID,
[in] UINT32 countCommunicationSessions
);
HRESULT OnVolumeUnduckNotification(
[in] LPCWSTR sessionID
);
};
[
local,
uuid(641dd20b-4d41-49cc-aba3-174b9477bb08),
pointer_default(unique),
object
]
interface IAudioSessionNotification : IUnknown
{
HRESULT OnSessionCreated(
[in] IAudioSessionControl *NewSession
);
};
[
local,
uuid(e2f5bb11-0570-40ca-acdd-3aa01277dee8),
pointer_default(unique),
object
]
interface IAudioSessionEnumerator : IUnknown
{
HRESULT GetCount(
[out] INT *SessionCount
);
HRESULT GetSession(
[in] INT SessionCount,
[out] IAudioSessionControl **Session
);
};
[
local,
uuid(77aa99a0-1bd6-484f-8bc7-2c654c9a9b6f),
pointer_default(unique),
object
]
interface IAudioSessionManager2 : IAudioSessionManager
{
HRESULT GetSessionEnumerator(
[retval,out] IAudioSessionEnumerator **SessionEnum
);
HRESULT RegisterSessionNotification(
[in] IAudioSessionNotification *SessionNotification
);
HRESULT UnregisterSessionNotification(
[in] IAudioSessionNotification *SessionNotification
);
HRESULT RegisterDuckNotification(
[string,in] LPCWSTR sessionID,
[in] IAudioVolumeDuckNotification *duckNotification
);
HRESULT UnregisterDuckNotification(
[in] IAudioVolumeDuckNotification *duckNotification
);
};

View file

@ -0,0 +1,736 @@
/*
* Core Audio device topology definitions
*
* Copyright 2009 Maarten Lankhorst
*
* 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
*
*/
interface IPart;
interface IControlInterface;
interface IDeviceTopology;
interface IControlChangeNotify;
import "oaidl.idl";
import "ocidl.idl";
import "propidl.idl";
cpp_quote("#ifndef E_NOTFOUND")
cpp_quote("#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)")
cpp_quote("#endif")
cpp_quote("#define DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT 0x64726148 /* 'draH' */")
cpp_quote("DEFINE_GUID(EVENTCONTEXT_VOLUMESLIDER, 0xe2c2e9de, 0x09b1, 0x4b04,0x84,0xe5, 0x07, 0x93, 0x12, 0x25, 0xee, 0x04);")
cpp_quote("#define _IKsControl_")
cpp_quote("#include <ks.h>")
cpp_quote("#include <ksmedia.h>")
cpp_quote("#ifndef _KS_")
typedef struct {
ULONG FormatSize;
ULONG Flags;
ULONG SampleSize;
ULONG Reserved;
GUID MajorFormat;
GUID SubFormat;
GUID Specifier;
} KSDATAFORMAT;
typedef KSDATAFORMAT *PKSDATAFORMAT;
typedef struct
{
union
{
struct {
GUID Set;
ULONG Id;
ULONG Flags;
};
LONGLONG Alignment;
};
} KSIDENTIFIER;
typedef KSIDENTIFIER KSPROPERTY, *PKSPROPERTY;
typedef KSIDENTIFIER KSMETHOD, *PKSMETHOD;
typedef KSIDENTIFIER KSEVENT, *PKSEVENT;
typedef enum
{
eConnTypeUnknown = 0,
eConnType3Point5mm,
eConnTypeQuarter,
eConnTypeAtapiInternal,
eConnTypeRCA,
eConnTypeOptical,
eConnTypeOtherDigital,
eConnTypeOtherAnalog,
eConnTypeMultichannelAnalogDIN,
eConnTypeXlrProfessional,
eConnTypeRj11Modem,
eConnTypeCombination
} EPcxConnectionType;
typedef enum
{
eGeoLocRear = 1,
eGeoLocFront,
eGeoLocLeft,
eGeoLocRight,
eGeoLocTop,
eGeoLocBottom,
eGeoLocRearPanel,
eGeoLocRiser,
eGeoLocInsideMobileLid,
eGeoLocDrivebay,
eGeoLocHDMI,
eGeoLocOutsideMobileLid,
eGeoLocATAPI,
eGeoLocReserved5,
eGeoLocReserved6
} EPcxGeoLocation;
typedef enum
{
eGenLocPrimaryBox = 0,
eGenLocInternal,
eGenLocSeparate,
eGenLocOther
} EPcxGenLocation;
typedef enum
{
ePortConnJack = 0,
ePortConnIntegratedDevice,
ePortConnBothIntegratedAndJack,
ePortConnUnknown
} EPxcPortConnection;
typedef struct
{
DWORD ChannelMapping;
COLORREF Color;
EPcxConnectionType ConnectionType;
EPcxGeoLocation GeoLocation;
EPcxGenLocation GenLocation;
EPxcPortConnection PortConnection;
BOOL IsConnected;
} KSJACK_DESCRIPTION;
typedef KSJACK_DESCRIPTION *PKSJACK_DESCRIPTION;
typedef struct _LUID
{
DWORD LowPart;
LONG HighPart;
} LUID;
typedef struct _LUID *PLUID;
typedef enum
{
KSJACK_SINK_CONNECTIONTYPE_HDMI = 0,
KSJACK_SINK_CONNECTIONTYPE_DISPLAYPORT
} KSJACK_SINK_CONNECTIONTYPE;
typedef struct _tagKSJACK_SINK_INFORMATION
{
KSJACK_SINK_CONNECTIONTYPE ConnType;
WORD ManufacturerId;
WORD ProductId;
WORD AudioLatency;
BOOL HDCPCapable;
BOOL AICapable;
UCHAR SinkDescriptionLength;
WCHAR SinkDescription[32];
LUID PortId;
} KSJACK_SINK_INFORMATION;
typedef struct _tagKSJACK_DESCRIPTION2
{
DWORD DeviceStateInfo;
DWORD JackCapabilities;
} KSJACK_DESCRIPTION2;
typedef struct _tagKSJACK_DESCRIPTION2 *PKSJACK_DESCRIPTION2;
cpp_quote("#endif")
typedef enum
{
In = 0,
Out
} DataFlow;
typedef enum
{
Connector = 0,
Subunit
} PartType;
typedef enum
{
Unknown_Connector = 0,
Physical_Internal,
Physical_External,
Software_IO,
Software_Fixed,
Network
} ConnectorType;
[
pointer_default(unique),
nonextensible,
uuid(28f54685-06fd-11d2-b27a-00a0c9223196),
local,
object
]
interface IKsControl : IUnknown
{
HRESULT KsProperty(
[in] PKSPROPERTY Property,
[in] ULONG PropertyLength,
[in,out] void *PropertyData,
[in] ULONG DataLength,
[out] ULONG *BytesReturned
);
HRESULT KsMethod(
[in] PKSMETHOD Method,
[in] ULONG MethodLength,
[in,out] void *MethodData,
[in] ULONG DataLength,
[out] ULONG *BytesReturned
);
HRESULT KsEvent(
[in] PKSEVENT Event,
[in] ULONG EventLength,
[in,out] void *EventData,
[in] ULONG DataLength,
[out] ULONG *BytesReturned
);
}
[
pointer_default(unique),
nonextensible,
uuid(c2f8e001-f205-4bc9-99bc-c13b1e048ccb),
local,
object
]
interface IPerChannelDbLevel : IUnknown
{
HRESULT GetChannelCount(
[out] UINT *pcChannels
);
HRESULT GetLevelRange(
[in] UINT nChannel,
[out] float *pfMinLevelDB,
[out] float *pfMaxLevelDB,
[out] float *pfStepping
);
HRESULT GetLevel(
[in] UINT nChannel,
[out] float *pfLevelDB
);
HRESULT SetLevel(
[in] UINT nChannel,
[in] float fLevelDB,
[in,unique] LPCGUID pguidEventContext
);
HRESULT SetLevelUniform(
[in] float fLevelDB,
[in,unique] LPCGUID pguidEventContext
);
HRESULT SetLevelAllChannels(
[size_is(cChannels),in] float *aLevelsDB,
[in] ULONG cChannels,
[in] LPCGUID pguidEventContext
);
}
[
pointer_default(unique),
nonextensible,
uuid(7fb7b48f-531d-44a2-bcb3-5ad5a134b3dc),
local,
object
]
interface IAudioVolumeLevel : IPerChannelDbLevel
{
/* Empty */
}
[
pointer_default(unique),
nonextensible,
uuid(bb11c46f-ec28-493c-b88a-5db88062ce98),
local,
object
]
interface IAudioChannelConfig : IUnknown
{
HRESULT SetChannelConfig(
[in] DWORD dwConfig,
[in] LPCGUID pguidEventContext
);
HRESULT GetChannelConfig(
[in] DWORD dwConfig,
[retval,out] DWORD *pdwConfig
);
}
[
pointer_default(unique),
nonextensible,
uuid(7d8b1437-dd53-4350-9c1b-1ee2890bf938),
local,
object
]
interface IAudioLoudness : IUnknown
{
HRESULT GetEnabled(
[out] BOOL *pbEnabled
);
HRESULT SetEnabled(
[in] BOOL bEnabled,
[in] LPCGUID pguidEventContext
);
}
[
pointer_default(unique),
nonextensible,
uuid(4f03dc02-5e6e-4653-8f72-a030c123d598),
local,
object
]
interface IAudioInputSelector : IUnknown
{
HRESULT GetSelection(
[out] UINT *pnIdSelected
);
HRESULT SetSelection(
[in] UINT nIdSelect,
[unique,in] LPCGUID pguidEventContext
);
}
[
pointer_default(unique),
nonextensible,
uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
local,
object
]
interface IAudioOutputSelector : IUnknown
{
HRESULT GetSelection(
[out] UINT *pnIdSelected
);
HRESULT SetSelection(
[in] UINT nIdSelect,
[unique,in] LPCGUID pguidEventContext
);
}
[
pointer_default(unique),
nonextensible,
uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
local,
object
]
interface IAudioMute : IUnknown
{
HRESULT SetMute(
[in] BOOL bMute,
[unique,in] LPCGUID pguidEventContext
);
HRESULT GetMute(
[out] BOOL *pbMute
);
}
[
pointer_default(unique),
nonextensible,
uuid(a2b1a1d9-4db3-425d-a2b2-bd335cb3e2e5),
local,
object
]
interface IAudioBass : IPerChannelDbLevel
{
/* Empty */
}
[
pointer_default(unique),
nonextensible,
uuid(5e54b6d7-b44b-40d9-9a9e-e691d9ce6edf),
local,
object
]
interface IAudioMidRange : IPerChannelDbLevel
{
/* Empty */
}
[
pointer_default(unique),
nonextensible,
uuid(0a717812-694e-4907-b74b-bafa5cfdca7b),
local,
object
]
interface IAudioTreble : IPerChannelDbLevel
{
/* Empty */
}
[
pointer_default(unique),
nonextensible,
uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
local,
object
]
interface IAudioAutoGainControl : IUnknown
{
HRESULT GetEnabled(
[in] BOOL bEnabled,
[unique,in] LPCGUID pguidEventContext
);
HRESULT GetMute(
[out] BOOL *pbEnabled
);
}
[
pointer_default(unique),
nonextensible,
uuid(dd79923c-0599-45e0-b8b6-c8df7db6e796),
local,
object
]
interface IAudioPeakMeter : IUnknown
{
HRESULT GetChannelCount(
[out] UINT *pcChannels
);
HRESULT GetLevel(
[in] UINT nChannel,
[out] float *pfLevel
);
}
[
pointer_default(unique),
nonextensible,
uuid(3b22bcbf-2586-4af0-8583-205d391b807c),
local,
object
]
interface IDeviceSpecificProperty : IUnknown
{
HRESULT GetType(
[out] VARTYPE *pVType
);
HRESULT GetValue(
[out] VARTYPE *pvType,
[out,in] DWORD *pcbValue
);
HRESULT SetValue(
[in] void *pvValue,
[in] DWORD cbValue,
[in] LPCGUID pguidEventContext
);
HRESULT Get4BRange(
[out] LONG *plMin,
[out] LONG *plMax,
[out] LONG *plStepping
);
}
[
pointer_default(unique),
nonextensible,
uuid(3cb4a69d-bb6f-4d2b-95b7-452d2c155db5),
local,
object
]
interface IKsFormatSupport : IUnknown
{
HRESULT IsFormatSupported(
[size_is(cbFormat),in] PKSDATAFORMAT pKsFormat,
[in] DWORD cbFormat,
[out] BOOL *pbSupported
);
HRESULT GetDevicePreferredFormat(
[out] PKSDATAFORMAT *ppKsFormat
);
}
[
pointer_default(unique),
nonextensible,
uuid(4509f757-2d46-4637-8e62-ce7db944f57b),
local,
object
]
interface IKsJackDescription : IUnknown
{
HRESULT GetJackCount(
[out] UINT *pcJacks
);
HRESULT GetJackDescription(
[in] UINT nJack,
[out] KSJACK_DESCRIPTION *pDescription
);
}
[
pointer_default(unique),
nonextensible,
uuid(478f3a9b-e0c9-4827-9228-6f5505ffe76a),
local,
object
]
interface IKsJackDescription2 : IUnknown
{
HRESULT GetJackCount(
[out] UINT *pcJacks
);
HRESULT GetJackDescription2(
[in] UINT nJack,
[out] KSJACK_DESCRIPTION2 *pDescription2
);
}
[
pointer_default(unique),
nonextensible,
uuid(d9bd72ed-290f-4581-9ff3-61027a8fe532),
local,
object
]
interface IKsJackSinkInformation : IUnknown
{
HRESULT GetJackSinkInformation(
[out] KSJACK_SINK_INFORMATION *pJackSinkInformation
);
}
[
pointer_default(unique),
nonextensible,
uuid(6daa848c-5eb0-45cc-aea5-998a2cda1ffb),
local,
object
]
interface IPartsList : IUnknown
{
HRESULT GetCount(
[out] UINT *pCount
);
HRESULT GetPart(
[in] UINT nIndex,
[out] IPart **ppPart
);
}
[
pointer_default(unique),
nonextensible,
uuid(ae2de0e4-5bca-4f2d-aa46-5d13f8fdb3a9),
local,
object
]
interface IPart : IUnknown
{
HRESULT GetName(
[out] LPWSTR *ppwstrName
);
HRESULT GetLocalId(
[out] UINT *pnId
);
HRESULT GetGlobalId(
[out] LPWSTR *ppwstrGlobalId
);
HRESULT GetPartType(
[out] PartType *pPartType
);
HRESULT GetSubType(
[out] GUID *pSubType
);
HRESULT GetControlInterfaceCount(
[out] UINT *pCount
);
HRESULT GetControlInterface(
[in] UINT nIndex,
[out] IControlInterface **ppInterfaceDesc
);
HRESULT EnumPartsIncoming(
[out] IPartsList **ppParts
);
HRESULT EnumPartsOutgoing(
[out] IPartsList **ppParts
);
HRESULT GetTopologyObjects(
[out] IDeviceTopology **ppTopology
);
HRESULT Activate(
[in] DWORD dwClsContext,
[in] REFIID refiid,
[iid_is(refiid),out] void **ppvObject
);
HRESULT RegisterControlChangeCallback(
[in] REFGUID riid,
[in] IControlChangeNotify *pNotify
);
HRESULT UnregisterControlChangeCallback(
[in] IControlChangeNotify *pNotify
);
};
[
pointer_default(unique),
nonextensible,
uuid(9c2c4058-23f5-41de-877a-df3af236a09e),
local,
object
]
interface IConnector : IUnknown
{
HRESULT GetType(
[out] ConnectorType *pType
);
HRESULT GetDataFlow(
[out] DataFlow *pFlow
);
HRESULT ConnectTo(
[in] IConnector *pConnectTo
);
HRESULT Disconnect(void);
HRESULT IsConnected(
[out] BOOL *pbConnected
);
HRESULT GetConnectedTo(
[out] IConnector **ppConTo
);
HRESULT GetConnectorIdConnectedTo(
[out] LPWSTR *ppwstrConnectorId
);
HRESULT GetDeviceIdConnectedTo(
[out] LPWSTR *ppwstrDeviceId
);
}
[
pointer_default(unique),
nonextensible,
uuid(82149a85-dba6-4487-86bb-ea8f7fefcc71),
local,
object
]
interface ISubUnit: IUnknown
{
/* Empty IUnknown interface.. */
}
[
pointer_default(unique),
nonextensible,
uuid(45d37c3f-5140-444a-ae24-400789f3cbf3),
local,
object
]
interface IControlInterface : IUnknown
{
HRESULT GetName(
[out] LPWSTR *ppwstrName
);
HRESULT GetIID(
[out] GUID *pIID
);
}
[
pointer_default(unique),
nonextensible,
uuid(a09513ed-c709-4d21-bd7b-5f34c47f3947),
local,
object
]
interface IControlChangeNotify : IUnknown
{
HRESULT OnNotify(
[in] DWORD dwSenderProcessId,
[in] LPCGUID ppguidEventContext
);
}
[
pointer_default(unique),
nonextensible,
uuid(2a07407e-6497-4a18-9787-32f79bd0d98f),
local,
object
]
interface IDeviceTopology : IUnknown
{
HRESULT GetConnectorCount(
[out] UINT *pCount
);
HRESULT GetConnector(
[in] UINT nIndex,
[out] IConnector **ppConnector
);
HRESULT GetSubunitCount(
[out] UINT *pCount
);
HRESULT GetSubunit(
[in] UINT nIndex,
[out] ISubUnit **ppConnector
);
HRESULT GetPartById(
[in] UINT nId,
[out] IPart **ppPart
);
HRESULT GetDeviceId(
[out] LPWSTR *ppwstrDeviceId
);
HRESULT GetSignalPath(
[in] IPart *pIPartFrom,
[in] IPart *pIPartTo,
[in] BOOL bRejectMixedPaths,
[out] IPartsList **ppParts
);
}
[
version(1.0)
]
library DevTopologyLib
{
[
uuid(1df639d0-5ec1-47aa-9379-828dc1aa8c59),
]
coclass DeviceTopology
{
interface IDeviceTopology;
}
}

View file

@ -96,8 +96,13 @@ typedef struct _DEVPROPKEY {
const DEVPROPKEY DECLSPEC_HIDDEN DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
#endif
#else
#ifdef __GNUC__
#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
EXTERN_C const DEVPROPKEY DECLSPEC_HIDDEN name
#else
#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
EXTERN_C const DEVPROPKEY DECLSPEC_HIDDEN DECLSPEC_SELECTANY name
#endif
#endif /* INITGUID */
#ifndef IsEqualDevPropKey

View file

@ -0,0 +1,148 @@
/*
* Copyright (C) 2009 Maarten Lankhorst
*
* 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
*/
import "unknwn.idl";
import "devicetopology.idl";
typedef struct AUDIO_VOLUME_NOTIFICATION_DATA
{
GUID guidEventContext;
BOOL bMuted;
FLOAT fMasterVolume;
UINT nChannels;
FLOAT afChannelVolumes[1];
} AUDIO_VOLUME_NOTIFICATION_DATA;
cpp_quote("typedef struct AUDIO_VOLUME_NOTIFICATION_DATA *PAUDIO_VOLUME_NOTIFICATION_DATA;")
cpp_quote("#define ENDPOINT_HARDWARE_SUPPORT_VOLUME 0x1")
cpp_quote("#define ENDPOINT_HARDWARE_SUPPORT_MUTE 0x2")
cpp_quote("#define ENDPOINT_HARDWARE_SUPPORT_METER 0x4")
interface IAudioEndpointVolumeCallback;
interface IAudioEndpointVolume;
interface IAudioEndpointVolumeEx;
interface IAudioMeterInformation;
[
pointer_default(unique),
nonextensible,
uuid(657804fa-d6ad-4496-8a60-352752af4f89),
local,
object
]
interface IAudioEndpointVolumeCallback : IUnknown
{
HRESULT OnNotify(
AUDIO_VOLUME_NOTIFICATION_DATA *pNotify
);
}
[
pointer_default(unique),
nonextensible,
uuid(5cdf2c82-841e-4546-9722-0cf74078229a),
local,
object
]
interface IAudioEndpointVolume : IUnknown
{
HRESULT RegisterControlChangeNotify(
[in] IAudioEndpointVolumeCallback *pNotify
);
HRESULT UnregisterControlChangeNotify(
[in] IAudioEndpointVolumeCallback *pNotify
);
HRESULT GetChannelCount(
[out] UINT *pnChannelCount
);
HRESULT SetMasterVolumeLevel(
[in] FLOAT fLevelDB,
[unique,in] LPCGUID pguidEventContext
);
HRESULT SetMasterVolumeLevelScalar(
[in] FLOAT fLevel,
[unique,in] LPCGUID pguidEventContext
);
HRESULT GetMasterVolumeLevel(
[out] FLOAT *fLevelDB
);
HRESULT GetMasterVolumeLevelScalar(
[out] FLOAT *fLevel
);
HRESULT SetChannelVolumeLevel(
[in] UINT nChannel,
[in] FLOAT fLevelDB,
[unique,in] LPCGUID pguidEventContext
);
HRESULT SetChannelVolumeLevelScalar(
[in] UINT nChannel,
[in] FLOAT fLevel,
[unique,in] LPCGUID pguidEventContext
);
HRESULT GetChannelVolumeLevel(
[in] UINT nChannel,
[out] FLOAT *fLevelDB
);
HRESULT GetChannelVolumeLevelScalar(
[in] UINT nChannel,
[out] FLOAT *fLevel
);
HRESULT SetMute(
[in] BOOL bMute,
[unique,in] LPCGUID pguidEventContext
);
HRESULT GetMute(
[out] BOOL *bMute
);
HRESULT GetVolumeStepInfo(
[out] UINT *pnStep,
[out] UINT *pnStepCount
);
HRESULT VolumeStepUp(
[unique,in] LPCGUID pguidEventContext
);
HRESULT VolumeStepDown(
[unique,in] LPCGUID pguidEventContext
);
HRESULT QueryHardwareSupport(
[out] DWORD *pdwHardwareSupportMask
);
HRESULT GetVolumeRange(
[out] FLOAT *pflVolumeMindB,
[out] FLOAT *pflVolumeMaxdB,
[out] FLOAT *pflVolumeIncrementdB
);
}
[
pointer_default(unique),
nonextensible,
uuid(66e11784-f695-4f28-a505-a7080081a78f),
local,
object
]
interface IAudioEndpointVolumeEx : IAudioEndpointVolume
{
HRESULT GetVolumeRangeChannel(
[in] UINT iChannel,
[out] FLOAT *pflVolumeMindB,
[out] FLOAT *pflVolumeMaxdB,
[out] FLOAT *pflVolumeIncrementdB
);
}

View file

@ -814,6 +814,110 @@ typedef struct
ULONG ChannelMask;
} KSDATARANGE_MUSIC, *PKSDATARANGE_MUSIC;
#if (NTDDI_VERSION >= NTDDI_WINXPSP1)
#define STATIC_KSPROPSETID_Jack\
0x4509f757, 0x2d46, 0x4637, {0x8e, 0x62, 0xce, 0x7d, 0xb9, 0x44, 0xf5, 0x7b}
DEFINE_GUIDSTRUCT("4509F757-2D46-4637-8E62-CE7DB944F57B", KSPROPSETID_Jack);
#define KSPROPSETID_Jack DEFINE_GUIDNAMED(KSPROPSETID_Jack)
typedef enum {
KSPROPERTY_JACK_DESCRIPTION = 1,
KSPROPERTY_JACK_DESCRIPTION2,
KSPROPERTY_JACK_SINK_INFO,
KSPROPERTY_JACK_CONTAINERID
} KSPROPERTY_JACK;
typedef enum {
eConnTypeUnknown,
eConnType3Point5mm,
eConnTypeQuarter,
eConnTypeAtapiInternal,
eConnTypeRCA,
eConnTypeOptical,
eConnTypeOtherDigital,
eConnTypeOtherAnalog,
eConnTypeMultichannelAnalogDIN,
eConnTypeXlrProfessional,
eConnTypeRJ11Modem,
eConnTypeCombination
} EPcxConnectionType;
#define eGeoLocReserved5 eGeoLocNotApplicable
typedef enum {
eGeoLocRear = 0x1,
eGeoLocFront,
eGeoLocLeft,
eGeoLocRight,
eGeoLocTop,
eGeoLocBottom,
eGeoLocRearPanel,
eGeoLocRiser,
eGeoLocInsideMobileLid,
eGeoLocDrivebay,
eGeoLocHDMI,
eGeoLocOutsideMobileLid,
eGeoLocATAPI,
eGeoLocNotApplicable,
eGeoLocReserved6,
EPcxGeoLocation_enum_count
} EPcxGeoLocation;
typedef enum {
eGenLocPrimaryBox = 0,
eGenLocInternal,
eGenLocSeparate,
eGenLocOther,
EPcxGenLocation_enum_count
} EPcxGenLocation;
typedef enum {
ePortConnJack = 0,
ePortConnIntegratedDevice,
ePortConnBothIntegratedAndJack,
ePortConnUnknown
} EPxcPortConnection;
typedef struct {
DWORD ChannelMapping;
DWORD Color;
EPcxConnectionType ConnectionType;
EPcxGeoLocation GeoLocation;
EPcxGenLocation GenLocation;
EPxcPortConnection PortConnection;
BOOL IsConnected;
} KSJACK_DESCRIPTION, *PKSJACK_DESCRIPTION;
typedef enum {
KSJACK_SINK_CONNECTIONTYPE_HDMI = 0,
KSJACK_SINK_CONNECTIONTYPE_DISPLAYPORT
} KSJACK_SINK_CONNECTIONTYPE;
#define MAX_SINK_DESCRIPTION_NAME_LENGTH 32
typedef struct _tagKSJACK_SINK_INFORMATION {
KSJACK_SINK_CONNECTIONTYPE ConnType;
WORD ManufacturerId;
WORD ProductId;
WORD AudioLatency;
BOOL HDCPCapable;
BOOL AICapable;
UCHAR SinkDescriptionLength;
WCHAR SinkDescription[MAX_SINK_DESCRIPTION_NAME_LENGTH];
LUID PortId;
} KSJACK_SINK_INFORMATION, *PKSJACK_SINK_INFORMATION;
#define JACKDESC2_PRESENCE_DETECT_CAPABILITY 0x1
#define JACKDESC2_DYNAMIC_FORMAT_CHANGE_CAPABILITY 0x2
typedef struct _tagKSJACK_DESCRIPTION2 {
DWORD DeviceStateInfo;
DWORD JackCapabilities;
} KSJACK_DESCRIPTION2, *PKSJACK_DESCRIPTION2;
#endif /* (NTDDI_VERSION >= NTDDI_WINXPSP1) */
#ifndef _SPEAKER_POSITIONS_
#define _SPEAKER_POSITIONS_

View file

@ -51,3 +51,6 @@ DEFINE_GUID(CLSID_StdPicture, 0x0BE35204, 0x8F91, 0x11CE, 0x9D,0xE3, 0x00,0xAA,0
DEFINE_GUID(CLSID_StdFont, 0x0BE35203, 0x8F91, 0x11CE, 0x9D,0xE3, 0x00,0xAA,0x00,0x4B,0xB8,0x51);
DEFINE_GUID(SID_VariantConversion, 0x1f101481,0xbccd,0x11d0,0x93,0x36,0x00,0xa0,0xc9,0xd,0xca,0xa9);
DEFINE_GUID(KSDATAFORMAT_SUBTYPE_PCM, 0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
DEFINE_GUID(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);

View file

@ -103,6 +103,7 @@ reactos/dll/win32/mciqtz32 # Synced to Wine-1.7.1
reactos/dll/win32/mciseq # Synced to Wine-1.7.1
reactos/dll/win32/mciwave # Synced to Wine-1.5.19
reactos/dll/win32/mlang # Synced to Wine-1.7.1
reactos/dll/win32/mmdevapi # Synced to Wine-1.7.1
reactos/dll/win32/mpr # Synced to Wine-1.7.1
reactos/dll/win32/mprapi # Synced to Wine-1.5.19
reactos/dll/win32/msacm32 # Synced to Wine-1.7.1

View file

@ -59,6 +59,7 @@ AddReg=Classes
11,,jscript.dll,1
;11,,ksproxy.ax,1
11,,mlang.dll,1
11,,mmdevapi.dll,1
11,,mscat32.dll,1
11,,msctf.dll,1
11,,mshtml.dll,3