Mark Harmstone : mmdevapi: Allow PKEY_AudioEndpoint_PhysicalSpeakers to be overridden.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jan 27 16:23:59 CST 2015


Module: wine
Branch: master
Commit: 7b8dbc477661bf1ac151f499bb1c56557f30ff26
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7b8dbc477661bf1ac151f499bb1c56557f30ff26

Author: Mark Harmstone <hellas at burntcomma.com>
Date:   Mon Jan 26 22:28:12 2015 +0000

mmdevapi: Allow PKEY_AudioEndpoint_PhysicalSpeakers to be overridden.

---

 dlls/mmdevapi/devenum.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c
index c140437..9a27520 100644
--- a/dlls/mmdevapi/devenum.c
+++ b/dlls/mmdevapi/devenum.c
@@ -372,7 +372,17 @@ static MMDevice *MMDevice_Create(WCHAR *name, GUID *id, EDataFlow flow, DWORD st
             }
 
             if (flow != eCapture)
-                set_driver_prop_value(id, flow, &PKEY_AudioEndpoint_PhysicalSpeakers);
+            {
+                PROPVARIANT pv2;
+
+                PropVariantInit(&pv2);
+
+                /* make read-write by not overwriting if already set */
+                if (FAILED(MMDevice_GetPropValue(id, flow, &PKEY_AudioEndpoint_PhysicalSpeakers, &pv2)) || pv2.vt != VT_UI4)
+                    set_driver_prop_value(id, flow, &PKEY_AudioEndpoint_PhysicalSpeakers);
+
+                PropVariantClear(&pv2);
+            }
 
             RegCloseKey(keyprop);
         }




More information about the wine-cvs mailing list