mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
[MMDEVAPI] Sync with Wine Staging 1.9.11. CORE-11368
svn path=/trunk/; revision=71563
This commit is contained in:
parent
74d48a8c13
commit
0bdcd182df
|
@ -21,7 +21,7 @@
|
|||
typedef struct AEVImpl {
|
||||
IAudioEndpointVolumeEx IAudioEndpointVolumeEx_iface;
|
||||
LONG ref;
|
||||
float level;
|
||||
float master_vol;
|
||||
BOOL mute;
|
||||
} AEVImpl;
|
||||
|
||||
|
@ -102,9 +102,12 @@ static HRESULT WINAPI AEV_SetMasterVolumeLevel(IAudioEndpointVolumeEx *iface, fl
|
|||
{
|
||||
AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
|
||||
|
||||
FIXME("(%p)->(%f,%s): stub\n", iface, leveldb, debugstr_guid(ctx));
|
||||
TRACE("(%p)->(%f,%s)\n", iface, leveldb, debugstr_guid(ctx));
|
||||
|
||||
This->level = leveldb;
|
||||
if(leveldb < -100.f || leveldb > 0.f)
|
||||
return E_INVALIDARG;
|
||||
|
||||
This->master_vol = leveldb;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -120,12 +123,12 @@ static HRESULT WINAPI AEV_GetMasterVolumeLevel(IAudioEndpointVolumeEx *iface, fl
|
|||
{
|
||||
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_GetChannelVolumeLevelScalar(IAudioEndpointVolumeEx *if
|
|||
static HRESULT WINAPI AEV_SetMute(IAudioEndpointVolumeEx *iface, BOOL mute, const GUID *ctx)
|
||||
{
|
||||
AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
|
||||
HRESULT ret;
|
||||
|
||||
FIXME("(%p)->(%u,%s): stub\n", iface, mute, debugstr_guid(ctx));
|
||||
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_QueryHardwareSupport(IAudioEndpointVolumeEx *iface, DW
|
|||
|
||||
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 @@ static const IAudioEndpointVolumeExVtbl AEVImpl_Vtbl = {
|
|||
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;
|
||||
*ppv = &This->IAudioEndpointVolumeEx_iface;
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -577,8 +577,9 @@ static HRESULT WINAPI MMDevice_Activate(IMMDevice *iface, REFIID riid, DWORD cls
|
|||
|
||||
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))
|
||||
{
|
||||
|
|
|
@ -277,7 +277,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
|||
*ppv = &MMDEVAPI_CF[i];
|
||||
return S_OK;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
WARN("(%s, %s, %p): no class found.\n", debugstr_guid(rclsid),
|
||||
|
|
|
@ -99,7 +99,7 @@ typedef struct MMDevice {
|
|||
} 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;
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ reactos/dll/win32/mciseq # Synced to WineStaging-1.9.4
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue