From: Matteo Bruni mbruni@codeweavers.com
This is the expected behavior when dsound is implemented on top of mmdevapi (Vista+).
Fixes: 8856ea79f3468d6f532f5f20e9b28c295d6e1db1 --- dlls/dsound/dsound_main.c | 7 ++++--- dlls/dsound/dsound_private.h | 2 -- dlls/dsound/propset.c | 7 +++++-- 3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c index 19e94c1071d..8936b437ba2 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -79,8 +79,6 @@ CRITICAL_SECTION DSOUND_renderers_lock = { &DSOUND_renderers_lock_debug, -1, 0, GUID *DSOUND_renderer_guids; GUID *DSOUND_capture_guids;
-const WCHAR wine_vxd_drv[] = L"winemm.vxd"; - /* All default settings, you most likely don't want to touch these, see wiki on UsefulRegistryKeys */ int ds_hel_buflen = 32768 * 2;
@@ -408,6 +406,7 @@ static BOOL send_device(IMMDevice *device, GUID *guid, PROPVARIANT pv; BOOL keep_going; HRESULT hr; + WCHAR *id;
PropVariantInit(&pv);
@@ -434,8 +433,10 @@ static BOOL send_device(IMMDevice *device, GUID *guid, TRACE("Calling back with %s (%s)\n", wine_dbgstr_guid(guid), wine_dbgstr_w(pv.pwszVal));
- keep_going = cb(guid, pv.pwszVal, wine_vxd_drv, user); + hr = IMMDevice_GetId(device, &id); + keep_going = cb(guid, pv.pwszVal, id, user);
+ CoTaskMemFree(id); PropVariantClear(&pv); IPropertyStore_Release(ps);
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h index 89053cff722..647f2273838 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h @@ -259,8 +259,6 @@ extern struct list DSOUND_renderers; extern GUID *DSOUND_renderer_guids; extern GUID *DSOUND_capture_guids;
-extern const WCHAR wine_vxd_drv[]; - void setup_dsound_options(void);
HRESULT get_mmdevice(EDataFlow flow, const GUID *tgt, IMMDevice **device); diff --git a/dlls/dsound/propset.c b/dlls/dsound/propset.c index 7c87f6ab40b..7e079599ca7 100644 --- a/dlls/dsound/propset.c +++ b/dlls/dsound/propset.c @@ -198,6 +198,7 @@ static HRESULT DSPROPERTY_DescriptionW( IPropertyStore *ps; PROPVARIANT pv; HRESULT hr; + WCHAR *id;
TRACE("pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n", pPropData,cbPropData,pcbReturned); @@ -248,9 +249,11 @@ static HRESULT DSPROPERTY_DescriptionW( }
ppd->Description = wcsdup(pv.pwszVal); - ppd->Module = wcsdup(wine_vxd_drv); + hr = IMMDevice_GetId(mmdevice, &id); + ppd->Module = wcsdup(id); + CoTaskMemFree(id); ppd->Interface = wcsdup(wInterface); - ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; + ppd->Type = DIRECTSOUNDDEVICE_TYPE_WDM;
PropVariantClear(&pv); IPropertyStore_Release(ps);