Ken Thomases : winecoreaudio: Enable DirectSound HEL mode for output.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jul 12 08:32:24 CDT 2007
Module: wine
Branch: master
Commit: 631f306c3eb7364fb06ddecaf3f999356db71243
URL: http://source.winehq.org/git/wine.git/?a=commit;h=631f306c3eb7364fb06ddecaf3f999356db71243
Author: Ken Thomases <ken at codeweavers.com>
Date: Wed Jul 11 20:34:34 2007 -0500
winecoreaudio: Enable DirectSound HEL mode for output.
---
dlls/winecoreaudio.drv/audio.c | 31 ++++++++++++++++++++++++++++---
1 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/dlls/winecoreaudio.drv/audio.c b/dlls/winecoreaudio.drv/audio.c
index bc7482c..dbd8295 100644
--- a/dlls/winecoreaudio.drv/audio.c
+++ b/dlls/winecoreaudio.drv/audio.c
@@ -1424,6 +1424,32 @@ static DWORD wodDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2)
}
/**************************************************************************
+ * widDsCreate [internal]
+ */
+static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
+{
+ TRACE("(%d,%p)\n",wDevID,drv);
+
+ FIXME("DirectSound not implemented\n");
+ FIXME("The (slower) DirectSound HEL mode will be used instead.\n");
+ return MMSYSERR_NOTSUPPORTED;
+}
+
+/**************************************************************************
+* wodDsDesc [internal]
+*/
+static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
+{
+ /* The DirectSound HEL will automatically wrap a non-DirectSound-capable
+ * driver in a DirectSound adaptor, thus allowing the driver to be used by
+ * DirectSound clients. However, it only does this if we respond
+ * successfully to the DRV_QUERYDSOUNDDESC message. It's enough to fill in
+ * the driver and device names of the description output parameter. */
+ memcpy(desc, &(WOutDev[wDevID].cadev->ds_desc), sizeof(DSDRIVERDESC));
+ return MMSYSERR_NOERROR;
+}
+
+/**************************************************************************
* wodMessage (WINECOREAUDIO.7)
*/
DWORD WINAPI CoreAudio_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
@@ -1463,9 +1489,8 @@ DWORD WINAPI CoreAudio_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case DRV_QUERYDEVICEINTERFACESIZE: return wodDevInterfaceSize (wDevID, (LPDWORD)dwParam1);
case DRV_QUERYDEVICEINTERFACE: return wodDevInterface (wDevID, (PWCHAR)dwParam1, dwParam2);
- case DRV_QUERYDSOUNDIFACE:
- case DRV_QUERYDSOUNDDESC:
- return MMSYSERR_NOTSUPPORTED;
+ case DRV_QUERYDSOUNDIFACE: return wodDsCreate (wDevID, (PIDSDRIVER*)dwParam1);
+ case DRV_QUERYDSOUNDDESC: return wodDsDesc (wDevID, (PDSDRIVERDESC)dwParam1);
default:
FIXME("unknown message %d!\n", wMsg);
More information about the wine-cvs
mailing list