From: Mark Harmstone Subject: [PATCH 1/3] mmdevapi: allow PKEY_AudioEndpoint_PhysicalSpeakers to be overridden Message-Id: <54C6BF7C.6050601@burntcomma.com> Date: Mon, 26 Jan 2015 22:28:12 +0000 A set of three patches to fix bug 37957. This adds controls to the Audio tab of winecfg, to allow the prop key PKEY_AudioEndpoint_PhysicalSpeaker to be overriden. This is parallel functionality to Windows itself, which does much the same thing. --- 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); }