The missing part of multiple device support for winearts, wineaudioio,

winejack and winenas.
This commit is contained in:
Jerry Ji 2003-04-27 00:37:08 +00:00 committed by Alexandre Julliard
parent ecaf53f172
commit 79916df96b
6 changed files with 113 additions and 8 deletions

View File

@ -5,7 +5,7 @@ VPATH = @srcdir@
MODULE = winearts.drv MODULE = winearts.drv
IMPORTS = winmm user32 kernel32 IMPORTS = winmm user32 kernel32
EXTRAINCL = @ARTSINCL@ EXTRAINCL = @ARTSINCL@
EXTRALIBS = @ARTSLIBS@ EXTRALIBS = @ARTSLIBS@ $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o

View File

@ -154,6 +154,8 @@ typedef struct {
static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV]; static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV];
static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv); 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 */ /* These strings used only for tracing */
static const char *wodPlayerCmdString[] = { 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_RESTART: return wodRestart (wDevID);
case WODM_RESET: return wodReset (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: default:
FIXME("unknown message %d!\n", wMsg); FIXME("unknown message %d!\n", wMsg);
} }
@ -1401,6 +1405,20 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
return MMSYSERR_NOTSUPPORTED; 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 */ #else /* !HAVE_ARTS */
/************************************************************************** /**************************************************************************

View File

@ -176,6 +176,11 @@ static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV];
static WINE_WAVEIN WInDev [MAX_WAVEINDRV ]; static WINE_WAVEIN WInDev [MAX_WAVEINDRV ];
static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv); 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 * * 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_RESTART: return wodRestart (wDevID);
case WODM_RESET: return wodReset (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: default:
FIXME("unknown message %d!\n", wMsg); FIXME("unknown message %d!\n", wMsg);
} }
@ -1503,8 +1510,8 @@ static HRESULT WINAPI IDsDriverImpl_GetDriverDesc(PIDSDRIVER iface, PDSDRIVERDES
TRACE("(%p,%p)\n",iface,pDesc); TRACE("(%p,%p)\n",iface,pDesc);
pDesc->dwFlags = DSDDESC_DOMMSYSTEMOPEN | DSDDESC_DOMMSYSTEMSETFORMAT | pDesc->dwFlags = DSDDESC_DOMMSYSTEMOPEN | DSDDESC_DOMMSYSTEMSETFORMAT |
DSDDESC_USESYSTEMMEMORY | DSDDESC_DONTNEEDPRIMARYLOCK; DSDDESC_USESYSTEMMEMORY | DSDDESC_DONTNEEDPRIMARYLOCK;
strcpy(pDesc->szDesc,"WineOSS DirectSound Driver"); strcpy(pDesc->szDesc,"Wine AudioIO DirectSound Driver");
strcpy(pDesc->szDrvName,"wineoss.drv"); strcpy(pDesc->szDrvName,"wineaudioio.drv");
pDesc->dnDevNode = WOutDev[This->wDevID].waveDesc.dnDevNode; pDesc->dnDevNode = WOutDev[This->wDevID].waveDesc.dnDevNode;
pDesc->wVxdId = 0; pDesc->wVxdId = 0;
pDesc->wReserved = 0; pDesc->wReserved = 0;
@ -1676,6 +1683,20 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
return MMSYSERR_NOERROR; 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 * * 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_RESET: return widReset (wDevID);
case WIDM_START: return widStart (wDevID); case WIDM_START: return widStart (wDevID);
case WIDM_STOP: return widStop (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: default:
FIXME("unknown message %u!\n", wMsg); FIXME("unknown message %u!\n", wMsg);
} }
return MMSYSERR_NOTSUPPORTED; 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 */ #else /* HAVE_LIBAUDIOIO */
/************************************************************************** /**************************************************************************

View File

@ -177,6 +177,9 @@ static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV];
static WINE_WAVEIN WInDev [MAX_WAVEINDRV ]; static WINE_WAVEIN WInDev [MAX_WAVEINDRV ];
static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv); 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 LPWAVEHDR wodHelper_PlayPtrNext(WINE_WAVEOUT* wwo);
static DWORD wodHelper_NotifyCompletions(WINE_WAVEOUT* wwo, BOOL force); static DWORD wodHelper_NotifyCompletions(WINE_WAVEOUT* wwo, BOOL force);
@ -1554,6 +1557,8 @@ DWORD WINAPI JACK_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case WODM_RESET: return wodReset(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: default:
FIXME("unknown message %d!\n", wMsg); FIXME("unknown message %d!\n", wMsg);
} }
@ -1596,6 +1601,20 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
return MMSYSERR_NOTSUPPORTED; 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 * * Low level WAVE IN implementation *
*======================================================================*/ *======================================================================*/

View File

@ -5,7 +5,7 @@ VPATH = @srcdir@
MODULE = winenas.drv MODULE = winenas.drv
IMPORTS = winmm user32 kernel32 IMPORTS = winmm user32 kernel32
EXTRAINCL = @X_CFLAGS@ EXTRAINCL = @X_CFLAGS@
EXTRALIBS = @NASLIBS@ EXTRALIBS = @NASLIBS@ $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o

View File

@ -185,6 +185,8 @@ typedef struct {
static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV]; static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV];
static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv); static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv);
static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc);
static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid);
/* NASFUNC */ /* NASFUNC */
@ -1254,7 +1256,9 @@ DWORD WINAPI NAS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case WODM_RESTART: return wodRestart (wDevID); case WODM_RESTART: return wodRestart (wDevID);
case WODM_RESET: return wodReset (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: default:
FIXME("unknown message %d!\n", wMsg); FIXME("unknown message %d!\n", wMsg);
} }
@ -1273,6 +1277,20 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
return MMSYSERR_NOTSUPPORTED; 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) { static int nas_init(void) {
TRACE("NAS INIT\n"); TRACE("NAS INIT\n");
if (!(AuServ = AuOpenServer(NULL, 0, NULL, 0, NULL, NULL))) if (!(AuServ = AuOpenServer(NULL, 0, NULL, 0, NULL, NULL)))