Added patches to improve stubs for AEV_{Get,Set}MasterVolumeLevel and AEV_{Get,Set}Mute.

This commit is contained in:
Sebastian Lackner
2015-02-15 14:53:01 +01:00
parent c3d4426edd
commit eab42cde10
8 changed files with 154 additions and 8 deletions

View File

@@ -0,0 +1,36 @@
From e88178f705163d00848d550641734f0e06855509 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 8 Feb 2015 11:32:55 +0100
Subject: mmdevapi: Improve AEV_GetVolumeRange stub.
---
dlls/mmdevapi/audiovolume.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/mmdevapi/audiovolume.c b/dlls/mmdevapi/audiovolume.c
index 4cc3226..f174f58 100644
--- a/dlls/mmdevapi/audiovolume.c
+++ b/dlls/mmdevapi/audiovolume.c
@@ -248,11 +248,16 @@ static HRESULT WINAPI AEV_QueryHardwareSupport(IAudioEndpointVolumeEx *iface, DW
static HRESULT WINAPI AEV_GetVolumeRange(IAudioEndpointVolumeEx *iface, float *mindb, float *maxdb, float *inc)
{
- TRACE("(%p)->(%p,%p,%p)\n", iface, mindb, maxdb, inc);
+ FIXME("(%p)->(%p,%p,%p): stub\n", iface, mindb, maxdb, inc);
+
if (!mindb || !maxdb || !inc)
return E_POINTER;
- FIXME("stub\n");
- return E_NOTIMPL;
+
+ *mindb = 0.0f;
+ *maxdb = 1.0f;
+ *inc = 0.1f;
+
+ return S_OK;
}
static HRESULT WINAPI AEV_GetVolumeRangeChannel(IAudioEndpointVolumeEx *iface, UINT chan, float *mindb, float *maxdb, float *inc)
--
2.2.2

View File

@@ -0,0 +1,70 @@
From 6e92d3988f6678c45e8752000170f07d186d9c9e Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 8 Feb 2015 11:38:17 +0100
Subject: mmdevapi: Improve AEV_SetMasterVolumeLevel and
AEV_GetMasterVolumeLevel stubs.
---
dlls/mmdevapi/audiovolume.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/dlls/mmdevapi/audiovolume.c b/dlls/mmdevapi/audiovolume.c
index 4cc3226..4765935 100644
--- a/dlls/mmdevapi/audiovolume.c
+++ b/dlls/mmdevapi/audiovolume.c
@@ -47,6 +47,7 @@ static const IAudioEndpointVolumeExVtbl AEVImpl_Vtbl;
typedef struct AEVImpl {
IAudioEndpointVolumeEx IAudioEndpointVolumeEx_iface;
LONG ref;
+ float level;
} AEVImpl;
static inline AEVImpl *impl_from_IAudioEndpointVolumeEx(IAudioEndpointVolumeEx *iface)
@@ -63,6 +64,7 @@ HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolume **ppv)
return E_OUTOFMEMORY;
This->IAudioEndpointVolumeEx_iface.lpVtbl = &AEVImpl_Vtbl;
This->ref = 1;
+ This->level = 1.0f;
return S_OK;
}
@@ -136,9 +138,13 @@ static HRESULT WINAPI AEV_GetChannelCount(IAudioEndpointVolumeEx *iface, UINT *c
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;
+ AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
+
+ FIXME("(%p)->(%f,%s): stub\n", iface, leveldb, debugstr_guid(ctx));
+
+ This->level = leveldb;
+
+ return S_OK;
}
static HRESULT WINAPI AEV_SetMasterVolumeLevelScalar(IAudioEndpointVolumeEx *iface, float level, const GUID *ctx)
@@ -150,11 +156,16 @@ static HRESULT WINAPI AEV_SetMasterVolumeLevelScalar(IAudioEndpointVolumeEx *ifa
static HRESULT WINAPI AEV_GetMasterVolumeLevel(IAudioEndpointVolumeEx *iface, float *leveldb)
{
- TRACE("(%p)->(%p)\n", iface, leveldb);
+ AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
+
+ FIXME("(%p)->(%p): stub\n", iface, leveldb);
+
if (!leveldb)
return E_POINTER;
- FIXME("stub\n");
- return E_NOTIMPL;
+
+ *leveldb = This->level;
+
+ return S_OK;
}
static HRESULT WINAPI AEV_GetMasterVolumeLevelScalar(IAudioEndpointVolumeEx *iface, float *level)
--
2.3.0

View File

@@ -0,0 +1,66 @@
From ccdb37883bd0ceeaad872dcd90e0b17d6dc7fd85 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Tue, 10 Feb 2015 20:12:12 +0100
Subject: mmdevapi: Improve AEV_SetMute and AEV_GetMute stubs.
---
dlls/mmdevapi/audiovolume.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/dlls/mmdevapi/audiovolume.c b/dlls/mmdevapi/audiovolume.c
index 4765935..c7d7ebe 100644
--- a/dlls/mmdevapi/audiovolume.c
+++ b/dlls/mmdevapi/audiovolume.c
@@ -48,6 +48,7 @@ typedef struct AEVImpl {
IAudioEndpointVolumeEx IAudioEndpointVolumeEx_iface;
LONG ref;
float level;
+ BOOL mute;
} AEVImpl;
static inline AEVImpl *impl_from_IAudioEndpointVolumeEx(IAudioEndpointVolumeEx *iface)
@@ -65,6 +66,7 @@ HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolume **ppv)
This->IAudioEndpointVolumeEx_iface.lpVtbl = &AEVImpl_Vtbl;
This->ref = 1;
This->level = 1.0f;
+ This->mute = FALSE;
return S_OK;
}
@@ -211,18 +213,27 @@ static HRESULT WINAPI AEV_GetChannelVolumeLevelScalar(IAudioEndpointVolumeEx *if
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;
+ AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
+
+ FIXME("(%p)->(%u,%s): stub\n", iface, mute, debugstr_guid(ctx));
+
+ This->mute = mute;
+
+ return S_OK;
}
static HRESULT WINAPI AEV_GetMute(IAudioEndpointVolumeEx *iface, BOOL *mute)
{
- TRACE("(%p)->(%p)\n", iface, mute);
+ AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
+
+ FIXME("(%p)->(%p): stub\n", iface, mute);
+
if (!mute)
return E_POINTER;
- FIXME("stub\n");
- return E_NOTIMPL;
+
+ *mute = This->mute;
+
+ return S_OK;
}
static HRESULT WINAPI AEV_GetVolumeStepInfo(IAudioEndpointVolumeEx *iface, UINT *stepsize, UINT *stepcount)
--
2.3.0

View File

@@ -0,0 +1,3 @@
Fixes: [35658] Improve stub for AEV_GetVolumeRange
Fixes: Improve stubs for AEV_{Get,Set}MasterVolumeLevel
Fixes: Improve stubs for AEV_{Get,Set}Mute