Author: akhaldi
Date: Sun Jun 5 19:33:06 2016
New Revision: 71563
URL:
http://svn.reactos.org/svn/reactos?rev=71563&view=rev
Log:
[MMDEVAPI] Sync with Wine Staging 1.9.11. CORE-11368
Modified:
trunk/reactos/dll/win32/mmdevapi/audiovolume.c
trunk/reactos/dll/win32/mmdevapi/devenum.c
trunk/reactos/dll/win32/mmdevapi/main.c
trunk/reactos/dll/win32/mmdevapi/mmdevapi.h
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/mmdevapi/audiovolume.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mmdevapi/audiovo…
==============================================================================
--- trunk/reactos/dll/win32/mmdevapi/audiovolume.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mmdevapi/audiovolume.c [iso-8859-1] Sun Jun 5 19:33:06 2016
@@ -21,7 +21,7 @@
typedef struct AEVImpl {
IAudioEndpointVolumeEx IAudioEndpointVolumeEx_iface;
LONG ref;
- float level;
+ float master_vol;
BOOL mute;
} AEVImpl;
@@ -102,9 +102,12 @@
{
AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
- FIXME("(%p)->(%f,%s): stub\n", iface, leveldb, debugstr_guid(ctx));
-
- This->level = leveldb;
+ TRACE("(%p)->(%f,%s)\n", iface, leveldb, debugstr_guid(ctx));
+
+ if(leveldb < -100.f || leveldb > 0.f)
+ return E_INVALIDARG;
+
+ This->master_vol = leveldb;
return S_OK;
}
@@ -120,12 +123,12 @@
{
AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
- FIXME("(%p)->(%p): stub\n", iface, leveldb);
+ TRACE("(%p)->(%p)\n", iface, leveldb);
if (!leveldb)
return E_POINTER;
- *leveldb = This->level;
+ *leveldb = This->master_vol;
return S_OK;
}
@@ -174,19 +177,22 @@
static HRESULT WINAPI AEV_SetMute(IAudioEndpointVolumeEx *iface, BOOL mute, const GUID
*ctx)
{
AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
-
- FIXME("(%p)->(%u,%s): stub\n", iface, mute, debugstr_guid(ctx));
+ HRESULT ret;
+
+ TRACE("(%p)->(%u,%s)\n", iface, mute, debugstr_guid(ctx));
+
+ ret = This->mute == mute ? S_FALSE : S_OK;
This->mute = mute;
- return S_OK;
+ return ret;
}
static HRESULT WINAPI AEV_GetMute(IAudioEndpointVolumeEx *iface, BOOL *mute)
{
AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
- FIXME("(%p)->(%p): stub\n", iface, mute);
+ TRACE("(%p)->(%p)\n", iface, mute);
if (!mute)
return E_POINTER;
@@ -230,14 +236,14 @@
static HRESULT WINAPI AEV_GetVolumeRange(IAudioEndpointVolumeEx *iface, float *mindb,
float *maxdb, float *inc)
{
- FIXME("(%p)->(%p,%p,%p): stub\n", iface, mindb, maxdb, inc);
+ TRACE("(%p)->(%p,%p,%p)\n", iface, mindb, maxdb, inc);
if (!mindb || !maxdb || !inc)
return E_POINTER;
- *mindb = 0.0f;
- *maxdb = 1.0f;
- *inc = 0.1f;
+ *mindb = -100.f;
+ *maxdb = 0.f;
+ *inc = 1.f;
return S_OK;
}
@@ -276,19 +282,17 @@
AEV_GetVolumeRangeChannel
};
-HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolume **ppv)
+HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolumeEx **ppv)
{
AEVImpl *This;
*ppv = NULL;
- This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
+ This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*This));
if (!This)
return E_OUTOFMEMORY;
This->IAudioEndpointVolumeEx_iface.lpVtbl = &AEVImpl_Vtbl;
This->ref = 1;
- This->level = 1.0f;
- This->mute = FALSE;
-
- *ppv = (IAudioEndpointVolume*)&This->IAudioEndpointVolumeEx_iface;
- return S_OK;
-}
+
+ *ppv = &This->IAudioEndpointVolumeEx_iface;
+ return S_OK;
+}
Modified: trunk/reactos/dll/win32/mmdevapi/devenum.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mmdevapi/devenum…
==============================================================================
--- trunk/reactos/dll/win32/mmdevapi/devenum.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mmdevapi/devenum.c [iso-8859-1] Sun Jun 5 19:33:06 2016
@@ -577,8 +577,9 @@
if (IsEqualIID(riid, &IID_IAudioClient)){
hr = drvs.pGetAudioEndpoint(&This->devguid, iface, (IAudioClient**)ppv);
- }else if (IsEqualIID(riid, &IID_IAudioEndpointVolume))
- hr = AudioEndpointVolume_Create(This, (IAudioEndpointVolume**)ppv);
+ }else if (IsEqualIID(riid, &IID_IAudioEndpointVolume) ||
+ IsEqualIID(riid, &IID_IAudioEndpointVolumeEx))
+ hr = AudioEndpointVolume_Create(This, (IAudioEndpointVolumeEx**)ppv);
else if (IsEqualIID(riid, &IID_IAudioSessionManager)
|| IsEqualIID(riid, &IID_IAudioSessionManager2))
{
Modified: trunk/reactos/dll/win32/mmdevapi/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mmdevapi/main.c?…
==============================================================================
--- trunk/reactos/dll/win32/mmdevapi/main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mmdevapi/main.c [iso-8859-1] Sun Jun 5 19:33:06 2016
@@ -277,7 +277,6 @@
*ppv = &MMDEVAPI_CF[i];
return S_OK;
}
- i++;
}
WARN("(%s, %s, %p): no class found.\n", debugstr_guid(rclsid),
Modified: trunk/reactos/dll/win32/mmdevapi/mmdevapi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mmdevapi/mmdevap…
==============================================================================
--- trunk/reactos/dll/win32/mmdevapi/mmdevapi.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mmdevapi/mmdevapi.h [iso-8859-1] Sun Jun 5 19:33:06 2016
@@ -99,7 +99,7 @@
} MMDevice;
extern HRESULT AudioClient_Create(MMDevice *parent, IAudioClient **ppv) DECLSPEC_HIDDEN;
-extern HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolume **ppv)
DECLSPEC_HIDDEN;
+extern HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolumeEx **ppv)
DECLSPEC_HIDDEN;
extern const WCHAR drv_keyW[] DECLSPEC_HIDDEN;
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun 5 19:33:06 2016
@@ -99,7 +99,7 @@
reactos/dll/win32/mciwave # Synced to WineStaging-1.9.4
reactos/dll/win32/mgmtapi # Synced to WineStaging-1.9.11
reactos/dll/win32/mlang # Synced to WineStaging-1.9.4
-reactos/dll/win32/mmdevapi # Synced to WineStaging-1.9.4
+reactos/dll/win32/mmdevapi # Synced to WineStaging-1.9.11
reactos/dll/win32/mpr # Synced to WineStaging-1.9.4
reactos/dll/win32/mprapi # Synced to WineStaging-1.9.4
reactos/dll/win32/msacm32 # Synced to WineStaging-1.9.4