diff --git a/dlls/winmm/winearts/Makefile.in b/dlls/winmm/winearts/Makefile.in index b5f4493bffb..b089df955c5 100644 --- a/dlls/winmm/winearts/Makefile.in +++ b/dlls/winmm/winearts/Makefile.in @@ -5,7 +5,7 @@ VPATH = @srcdir@ MODULE = winearts.drv IMPORTS = winmm user32 kernel32 EXTRAINCL = @ARTSINCL@ -EXTRALIBS = @ARTSLIBS@ +EXTRALIBS = @ARTSLIBS@ $(LIBUUID) LDDLLFLAGS = @LDDLLFLAGS@ SYMBOLFILE = $(MODULE).tmp.o diff --git a/dlls/winmm/winearts/audio.c b/dlls/winmm/winearts/audio.c index 3c3f4ec7a46..5edc2286498 100644 --- a/dlls/winmm/winearts/audio.c +++ b/dlls/winmm/winearts/audio.c @@ -154,6 +154,8 @@ typedef struct { static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV]; static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv); +static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc); +static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid); /* These strings used only for tracing */ static const char *wodPlayerCmdString[] = { @@ -1382,7 +1384,9 @@ DWORD WINAPI ARTS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser, case WODM_RESTART: return wodRestart (wDevID); case WODM_RESET: return wodReset (wDevID); - case DRV_QUERYDSOUNDIFACE: return wodDsCreate(wDevID, (PIDSDRIVER*)dwParam1); + case DRV_QUERYDSOUNDIFACE: return wodDsCreate (wDevID, (PIDSDRIVER*)dwParam1); + case DRV_QUERYDSOUNDDESC: return wodDsDesc (wDevID, (PDSDRIVERDESC)dwParam1); + case DRV_QUERYDSOUNDGUID: return wodDsGuid (wDevID, (LPGUID)dwParam1); default: FIXME("unknown message %d!\n", wMsg); } @@ -1401,6 +1405,20 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv) return MMSYSERR_NOTSUPPORTED; } +static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc) +{ + memset(desc, 0, sizeof(*desc)); + strcpy(desc->szDesc, "Wine aRts DirectSound Driver"); + strcpy(desc->szDrvName, "winearts.drv"); + return MMSYSERR_NOERROR; +} + +static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid) +{ + memcpy(pGuid, &DSDEVID_DefaultPlayback, sizeof(GUID)); + return MMSYSERR_NOERROR; +} + #else /* !HAVE_ARTS */ /************************************************************************** diff --git a/dlls/winmm/wineaudioio/audio.c b/dlls/winmm/wineaudioio/audio.c index 015c4e850c4..25416ec993f 100644 --- a/dlls/winmm/wineaudioio/audio.c +++ b/dlls/winmm/wineaudioio/audio.c @@ -176,6 +176,11 @@ static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV]; static WINE_WAVEIN WInDev [MAX_WAVEINDRV ]; static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv); +static DWORD widDsCreate(UINT wDevID, PIDSCDRIVER* drv); +static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc); +static DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc); +static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid); +static DWORD widDsGuid(UINT wDevID, LPGUID pGuid); /*======================================================================* * Low level WAVE implementation * @@ -1242,7 +1247,9 @@ DWORD WINAPI LIBAUDIOIO_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser, case WODM_RESTART: return wodRestart (wDevID); case WODM_RESET: return wodReset (wDevID); - case DRV_QUERYDSOUNDIFACE: return wodDsCreate(wDevID, (PIDSDRIVER*)dwParam1); + case DRV_QUERYDSOUNDIFACE: return wodDsCreate (wDevID, (PIDSDRIVER*)dwParam1); + case DRV_QUERYDSOUNDDESC: return wodDsDesc (wDevID, (PDSDRIVERDESC)dwParam1); + case DRV_QUERYDSOUNDGUID: return wodDsGuid (wDevID, (LPGUID)dwParam1); default: FIXME("unknown message %d!\n", wMsg); } @@ -1503,8 +1510,8 @@ static HRESULT WINAPI IDsDriverImpl_GetDriverDesc(PIDSDRIVER iface, PDSDRIVERDES TRACE("(%p,%p)\n",iface,pDesc); pDesc->dwFlags = DSDDESC_DOMMSYSTEMOPEN | DSDDESC_DOMMSYSTEMSETFORMAT | DSDDESC_USESYSTEMMEMORY | DSDDESC_DONTNEEDPRIMARYLOCK; - strcpy(pDesc->szDesc,"WineOSS DirectSound Driver"); - strcpy(pDesc->szDrvName,"wineoss.drv"); + strcpy(pDesc->szDesc,"Wine AudioIO DirectSound Driver"); + strcpy(pDesc->szDrvName,"wineaudioio.drv"); pDesc->dnDevNode = WOutDev[This->wDevID].waveDesc.dnDevNode; pDesc->wVxdId = 0; pDesc->wReserved = 0; @@ -1676,6 +1683,20 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv) return MMSYSERR_NOERROR; } +static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc) +{ + memset(desc, 0, sizeof(*desc)); + strcpy(desc->szDesc, "Wine LIBAUDIOIO DirectSound Driver"); + strcpy(desc->szDrvName, "wineaudioio.drv"); + return MMSYSERR_NOERROR; +} + +static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid) +{ + memcpy(pGuid, &DSDEVID_DefaultPlayback, sizeof(GUID)); + return MMSYSERR_NOERROR; +} + /*======================================================================* * Low level WAVE IN implementation * *======================================================================*/ @@ -2259,12 +2280,41 @@ DWORD WINAPI LIBAUDIOIO_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser, case WIDM_RESET: return widReset (wDevID); case WIDM_START: return widStart (wDevID); case WIDM_STOP: return widStop (wDevID); + case DRV_QUERYDSOUNDIFACE: return widDsCreate (wDevID, (PIDSCDRIVER*)dwParam1); + case DRV_QUERYDSOUNDDESC: return widDsDesc (wDevID, (PDSDRIVERDESC)dwParam1); + case DRV_QUERYDSOUNDGUID: return widDsGuid (wDevID, (LPGUID)dwParam1); default: FIXME("unknown message %u!\n", wMsg); } return MMSYSERR_NOTSUPPORTED; } +/*======================================================================* + * Low level DSOUND capture implementation * + *======================================================================*/ +static DWORD widDsCreate(UINT wDevID, PIDSDRIVER* drv) +{ + /* we can't perform memory mapping as we don't have a file stream + interface with arts like we do with oss */ + MESSAGE("This sound card's driver does not support direct access\n"); + MESSAGE("The (slower) DirectSound HEL mode will be used instead.\n"); + return MMSYSERR_NOTSUPPORTED; +} + +static DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc) +{ + memset(desc, 0, sizeof(*desc)); + strcpy(desc->szDesc, "Wine LIBAUDIOIO DirectSound Driver"); + strcpy(desc->szDrvName, "wineaudioio.drv"); + return MMSYSERR_NOERROR; +} + +static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid) +{ + memcpy(pGuid, &DSDEVID_DefaultCapture, sizeof(GUID)); + return MMSYSERR_NOERROR; +} + #else /* HAVE_LIBAUDIOIO */ /************************************************************************** diff --git a/dlls/winmm/winejack/audio.c b/dlls/winmm/winejack/audio.c index a150ca1e9e7..a687db6c8bb 100644 --- a/dlls/winmm/winejack/audio.c +++ b/dlls/winmm/winejack/audio.c @@ -177,9 +177,12 @@ static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV]; static WINE_WAVEIN WInDev [MAX_WAVEINDRV ]; static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv); +static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc); +static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid); + static LPWAVEHDR wodHelper_PlayPtrNext(WINE_WAVEOUT* wwo); static DWORD wodHelper_NotifyCompletions(WINE_WAVEOUT* wwo, BOOL force); - + static int JACK_OpenDevice(WINE_WAVEOUT* wwo); #if JACK_CLOSE_HACK @@ -1554,6 +1557,8 @@ DWORD WINAPI JACK_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser, case WODM_RESET: return wodReset(wDevID); case DRV_QUERYDSOUNDIFACE: return wodDsCreate(wDevID, (PIDSDRIVER*)dwParam1); + case DRV_QUERYDSOUNDDESC: return wodDsDesc(wDevID, (PDSDRIVERDESC)dwParam1); + case DRV_QUERYDSOUNDGUID: return wodDsGuid(wDevID, (LPGUID)dwParam1); default: FIXME("unknown message %d!\n", wMsg); } @@ -1596,6 +1601,20 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv) return MMSYSERR_NOTSUPPORTED; } +static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc) +{ + memset(desc, 0, sizeof(*desc)); + strcpy(desc->szDesc, "Wine jack DirectSound Driver"); + strcpy(desc->szDrvName, "winejack.drv"); + return MMSYSERR_NOERROR; +} + +static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid) +{ + memcpy(pGuid, &DSDEVID_DefaultPlayback, sizeof(GUID)); + return MMSYSERR_NOERROR; +} + /*======================================================================* * Low level WAVE IN implementation * *======================================================================*/ diff --git a/dlls/winmm/winenas/Makefile.in b/dlls/winmm/winenas/Makefile.in index cd269fff97a..c7b607493a3 100644 --- a/dlls/winmm/winenas/Makefile.in +++ b/dlls/winmm/winenas/Makefile.in @@ -5,7 +5,7 @@ VPATH = @srcdir@ MODULE = winenas.drv IMPORTS = winmm user32 kernel32 EXTRAINCL = @X_CFLAGS@ -EXTRALIBS = @NASLIBS@ +EXTRALIBS = @NASLIBS@ $(LIBUUID) LDDLLFLAGS = @LDDLLFLAGS@ SYMBOLFILE = $(MODULE).tmp.o diff --git a/dlls/winmm/winenas/audio.c b/dlls/winmm/winenas/audio.c index 10686e8ff7a..49cb007812e 100644 --- a/dlls/winmm/winenas/audio.c +++ b/dlls/winmm/winenas/audio.c @@ -185,6 +185,8 @@ typedef struct { static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV]; static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv); +static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc); +static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid); /* NASFUNC */ @@ -1254,7 +1256,9 @@ DWORD WINAPI NAS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser, case WODM_RESTART: return wodRestart (wDevID); case WODM_RESET: return wodReset (wDevID); - case DRV_QUERYDSOUNDIFACE: return wodDsCreate(wDevID, (PIDSDRIVER*)dwParam1); + case DRV_QUERYDSOUNDIFACE: return wodDsCreate (wDevID, (PIDSDRIVER*)dwParam1); + case DRV_QUERYDSOUNDDESC: return wodDsDesc (wDevID, (PDSDRIVERDESC)dwParam1); + case DRV_QUERYDSOUNDGUID: return wodDsGuid (wDevID, (LPGUID)dwParam1); default: FIXME("unknown message %d!\n", wMsg); } @@ -1273,6 +1277,20 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv) return MMSYSERR_NOTSUPPORTED; } +static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc) +{ + memset(desc, 0, sizeof(*desc)); + strcpy(desc->szDesc, "Wine NAS DirectSound Driver"); + strcpy(desc->szDrvName, "winenas.drv"); + return MMSYSERR_NOERROR; +} + +static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid) +{ + memcpy(pGuid, &DSDEVID_DefaultPlayback, sizeof(GUID)); + return MMSYSERR_NOERROR; +} + static int nas_init(void) { TRACE("NAS INIT\n"); if (!(AuServ = AuOpenServer(NULL, 0, NULL, 0, NULL, NULL)))