Commit 7bf4eee7 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

Remove wine specific DRV_QUERYDSOUNDGUID message and calculate it in

dsound.dll (like in 2k/xp).
parent 93010bf3
......@@ -80,7 +80,6 @@ static IDirectSoundCaptureBuffer8Vtbl dscbvt;
static IDirectSoundFullDuplexVtbl dsfdvt;
static IDirectSoundCaptureImpl* dsound_capture = NULL;
static GUID capture_guids[MAXWAVEDRIVERS];
static const char * captureStateString[] = {
"STATE_STOPPED",
......@@ -197,11 +196,8 @@ DirectSoundCaptureEnumerateA(
devs = waveInGetNumDevs();
if (devs > 0) {
if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) {
GUID temp;
for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDGUID,(DWORD)&temp,0));
if (err == DS_OK) {
if (IsEqualGUID( &guid, &temp ) ) {
if (IsEqualGUID( &guid, &capture_guids[wid] ) ) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
......@@ -213,20 +209,16 @@ DirectSoundCaptureEnumerateA(
}
}
}
}
for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDGUID,(DWORD)&capture_guids[wid],0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&capture_guids[wid]),desc.szDesc,desc.szDrvName,lpContext);
if (lpDSEnumCallback(&capture_guids[wid], desc.szDesc, desc.szDrvName, lpContext) == FALSE)
return DS_OK;
}
}
}
return DS_OK;
}
......@@ -266,11 +258,8 @@ DirectSoundCaptureEnumerateW(
devs = waveInGetNumDevs();
if (devs > 0) {
if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) {
GUID temp;
for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDGUID,(DWORD)&temp,0));
if (err == DS_OK) {
if (IsEqualGUID( &guid, &temp ) ) {
if (IsEqualGUID( &guid, &capture_guids[wid] ) ) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
......@@ -286,13 +275,10 @@ DirectSoundCaptureEnumerateW(
}
}
}
}
for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDGUID,(DWORD)&capture_guids[wid],0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&capture_guids[wid]),desc.szDesc,desc.szDrvName,lpContext);
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1,
......@@ -303,7 +289,6 @@ DirectSoundCaptureEnumerateW(
return DS_OK;
}
}
}
return DS_OK;
}
......@@ -552,13 +537,7 @@ IDirectSoundCaptureImpl_Initialize(
/* enumerate WINMM audio devices and find the one we want */
for (wid=0; wid<widn; wid++) {
GUID guid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDGUID,(DWORD)(&guid),0));
if (err != DS_OK) {
WARN("waveInMessage failed; err=%lx\n",err);
return err;
}
if (IsEqualGUID( lpcGUID, &guid) ) {
if (IsEqualGUID( lpcGUID, &capture_guids[wid]) ) {
err = DS_OK;
break;
}
......
......@@ -734,7 +734,7 @@ HRESULT WINAPI IDirectSoundImpl_Create(
LPCGUID lpcGUID,
LPDIRECTSOUND8 * ppDS)
{
HRESULT err = DSERR_INVALIDPARAM;
HRESULT err;
PIDSDRIVER drv = NULL;
IDirectSoundImpl* pDS;
unsigned wod, wodn;
......@@ -752,27 +752,12 @@ HRESULT WINAPI IDirectSoundImpl_Create(
TRACE(" expecting GUID %s.\n", debugstr_guid(lpcGUID));
for (wod=0; wod<wodn; wod++) {
GUID guid;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDGUID,(DWORD)(&guid),0));
if (err != DS_OK) {
WARN("waveOutMessage failed; err=%lx\n",err);
*ppDS = NULL;
return err;
}
TRACE("got GUID %s for wod %d.\n", debugstr_guid(&guid), wod);
if (IsEqualGUID( lpcGUID, &guid)) {
err = DS_OK;
if (IsEqualGUID( lpcGUID, &renderer_guids[wod])) {
found = TRUE;
break;
}
}
if (err != DS_OK) {
WARN("invalid parameter\n");
*ppDS = NULL;
return DSERR_INVALIDPARAM;
}
if (found == FALSE) {
WARN("No device found matching given ID!\n");
*ppDS = NULL;
......
......@@ -86,7 +86,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound);
#define DS_SND_QUEUE_MIN 12 /* min number of fragments to prebuffer */
IDirectSoundImpl* dsound = NULL;
static GUID device_guids[MAXWAVEDRIVERS];
GUID renderer_guids[MAXWAVEDRIVERS];
GUID capture_guids[MAXWAVEDRIVERS];
HRESULT mmErr(UINT err)
{
......@@ -284,25 +285,17 @@ HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest)
if ( IsEqualGUID( &DSDEVID_DefaultPlayback, pGuidSrc ) ||
IsEqualGUID( &DSDEVID_DefaultVoicePlayback, pGuidSrc ) ) {
GUID guid;
int err = mmErr(waveOutMessage((HWAVEOUT)ds_default_playback,DRV_QUERYDSOUNDGUID,(DWORD)&guid,0));
if (err == DS_OK) {
memcpy(pGuidDest, &guid, sizeof(GUID));
memcpy(pGuidDest, &renderer_guids[ds_default_playback], sizeof(GUID));
TRACE("returns %s\n", get_device_id(pGuidDest));
return DS_OK;
}
}
if ( IsEqualGUID( &DSDEVID_DefaultCapture, pGuidSrc ) ||
IsEqualGUID( &DSDEVID_DefaultVoiceCapture, pGuidSrc ) ) {
GUID guid;
int err = mmErr(waveInMessage((HWAVEIN)ds_default_capture,DRV_QUERYDSOUNDGUID,(DWORD)&guid,0));
if (err == DS_OK) {
memcpy(pGuidDest, &guid, sizeof(GUID));
memcpy(pGuidDest, &capture_guids[ds_default_capture], sizeof(GUID));
TRACE("returns %s\n", get_device_id(pGuidDest));
return DS_OK;
}
}
memcpy(pGuidDest, pGuidSrc, sizeof(GUID));
TRACE("returns %s\n", get_device_id(pGuidDest));
......@@ -344,11 +337,8 @@ HRESULT WINAPI DirectSoundEnumerateA(
devs = waveOutGetNumDevs();
if (devs > 0) {
if (GetDeviceID(&DSDEVID_DefaultPlayback, &guid) == DS_OK) {
GUID temp;
for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDGUID,(DWORD)&temp,0));
if (err == DS_OK) {
if (IsEqualGUID( &guid, &temp ) ) {
if (IsEqualGUID( &guid, &renderer_guids[wod]) ) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
......@@ -360,20 +350,16 @@ HRESULT WINAPI DirectSoundEnumerateA(
}
}
}
}
for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDGUID,(DWORD)&device_guids[wod],0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&device_guids[wod]),desc.szDesc,desc.szDrvName,lpContext);
if (lpDSEnumCallback(&device_guids[wod], desc.szDesc, desc.szDrvName, lpContext) == FALSE)
debugstr_guid(&renderer_guids[wod]),desc.szDesc,desc.szDrvName,lpContext);
if (lpDSEnumCallback(&renderer_guids[wod], desc.szDesc, desc.szDrvName, lpContext) == FALSE)
return DS_OK;
}
}
}
return DS_OK;
}
......@@ -412,11 +398,8 @@ HRESULT WINAPI DirectSoundEnumerateW(
devs = waveOutGetNumDevs();
if (devs > 0) {
if (GetDeviceID(&DSDEVID_DefaultPlayback, &guid) == DS_OK) {
GUID temp;
for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDGUID,(DWORD)&temp,0));
if (err == DS_OK) {
if (IsEqualGUID( &guid, &temp ) ) {
if (IsEqualGUID( &guid, &renderer_guids[wod] ) ) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
......@@ -432,24 +415,20 @@ HRESULT WINAPI DirectSoundEnumerateW(
}
}
}
}
for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDGUID,(DWORD)&device_guids[wod],0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&device_guids[wod]),desc.szDesc,desc.szDrvName,lpContext);
debugstr_guid(&renderer_guids[wod]),desc.szDesc,desc.szDrvName,lpContext);
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1,
wDesc, sizeof(wDesc)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1,
wName, sizeof(wName)/sizeof(WCHAR) );
if (lpDSEnumCallback(&device_guids[wod], wDesc, wName, lpContext) == FALSE)
if (lpDSEnumCallback(&renderer_guids[wod], wDesc, wName, lpContext) == FALSE)
return DS_OK;
}
}
}
return DS_OK;
}
......@@ -678,3 +657,35 @@ DWORD WINAPI DSOUND_DllCanUnloadNow(void)
FIXME("(void): stub\n");
return S_FALSE;
}
#define INIT_GUID(guid, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
guid.Data1 = l; guid.Data2 = w1; guid.Data3 = w2; \
guid.Data4[0] = b1; guid.Data4[1] = b2; guid.Data4[2] = b3; \
guid.Data4[3] = b4; guid.Data4[4] = b5; guid.Data4[5] = b6; \
guid.Data4[6] = b7; guid.Data4[7] = b8;
/***********************************************************************
* DllMain (DSOUND.init)
*/
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
int i;
TRACE("(%p 0x%lx %p)\n", hInstDLL, fdwReason, lpvReserved);
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
TRACE("DLL_PROCESS_ATTACH\n");
for (i = 0; i < MAXWAVEDRIVERS; i++) {
INIT_GUID(renderer_guids[i], 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
INIT_GUID(capture_guids[i], 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
}
break;
case DLL_PROCESS_DETACH:
TRACE("DLL_PROCESS_DETACH\n");
break;
default:
TRACE("UNKNOWN REASON\n");
break;
}
return TRUE;
}
......@@ -489,6 +489,9 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb);
extern IDirectSoundImpl* dsound;
extern GUID renderer_guids[MAXWAVEDRIVERS];
extern GUID capture_guids[MAXWAVEDRIVERS];
extern HRESULT mmErr(UINT err);
extern void setup_dsound_options(void);
extern const char * get_device_id(LPCGUID pGuid);
......@@ -512,7 +512,6 @@ UINT MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg, DWORD dwParam1,
case DRV_QUERYDSOUNDIFACE: /* Wine-specific: Retrieve DirectSound interface */
case DRV_QUERYDSOUNDDESC: /* Wine-specific: Retrieve DirectSound driver description*/
case DRV_QUERYDSOUNDGUID: /* Wine-specific: Retrieve DirectSound driver GUID */
return MMDRV_Message(mld, uMsg, dwParam1, dwParam2, TRUE);
default:
......
......@@ -188,7 +188,6 @@ typedef struct {
/* DirectSound stuff */
DSDRIVERDESC ds_desc;
GUID ds_guid;
} WINE_WAVEOUT;
typedef struct {
......@@ -235,7 +234,6 @@ typedef struct {
/* DirectSound stuff */
DSDRIVERDESC ds_desc;
GUID ds_guid;
} WINE_WAVEIN;
static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV];
......@@ -245,7 +243,6 @@ static DWORD ALSA_WidNumDevs;
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 * getCmdString(enum win_wm_message msg)
......@@ -672,12 +669,6 @@ end:
return result;
}
#define INIT_GUID(guid, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
guid.Data1 = l; guid.Data2 = w1; guid.Data3 = w2; \
guid.Data4[0] = b1; guid.Data4[1] = b2; guid.Data4[2] = b3; \
guid.Data4[3] = b4; guid.Data4[4] = b5; guid.Data4[5] = b6; \
guid.Data4[6] = b7; guid.Data4[7] = b8;
/******************************************************************
* ALSA_WaveInit
*
......@@ -713,7 +704,6 @@ LONG ALSA_WaveInit(void)
wwo->caps.dwSupport = WAVECAPS_VOLUME;
strcpy(wwo->ds_desc.szDesc, "WineALSA DirectSound Driver");
strcpy(wwo->ds_desc.szDrvName, "winealsa.drv");
INIT_GUID(wwo->ds_guid, 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + 0);
if (!wine_dlopen("libasound.so.2", RTLD_LAZY|RTLD_GLOBAL, NULL, 0))
{
......@@ -828,7 +818,6 @@ LONG ALSA_WaveInit(void)
wwi->caps.dwSupport = WAVECAPS_VOLUME;
strcpy(wwi->ds_desc.szDesc, "WineALSA DirectSound Driver");
strcpy(wwi->ds_desc.szDrvName, "winealsa.drv");
INIT_GUID(wwi->ds_guid, 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + 0);
snd_pcm_info_alloca(&info);
snd_pcm_hw_params_alloca(&hw_params);
......@@ -2173,7 +2162,6 @@ DWORD WINAPI ALSA_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case DRV_QUERYDEVICEINTERFACE: return wodDevInterface (wDevID, (PWCHAR)dwParam1, dwParam2);
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);
......@@ -2736,15 +2724,6 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
return MMSYSERR_NOERROR;
}
static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid)
{
TRACE("(%d,%p)\n",wDevID,pGuid);
memcpy(pGuid, &(WOutDev[wDevID].ds_guid), sizeof(GUID));
return MMSYSERR_NOERROR;
}
/*======================================================================*
* Low level WAVE IN implementation *
*======================================================================*/
......@@ -3551,18 +3530,6 @@ static DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc)
}
/**************************************************************************
* widDsGuid [internal]
*/
static DWORD widDsGuid(UINT wDevID, LPGUID pGuid)
{
TRACE("(%d,%p)\n",wDevID,pGuid);
memcpy(pGuid, &(WInDev[wDevID].ds_guid), sizeof(GUID));
return MMSYSERR_NOERROR;
}
/**************************************************************************
* widMessage (WINEALSA.@)
*/
DWORD WINAPI ALSA_widMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
......@@ -3593,7 +3560,6 @@ DWORD WINAPI ALSA_widMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case DRV_QUERYDEVICEINTERFACE: return widDevInterface (wDevID, (PWCHAR)dwParam1, dwParam2);
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 %d!\n", wMsg);
}
......
......@@ -207,7 +207,6 @@ 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);
/* These strings used only for tracing */
static const char *wodPlayerCmdString[] = {
......@@ -1581,7 +1580,6 @@ DWORD WINAPI ARTS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case DRV_QUERYDEVICEINTERFACE: return wodDevInterface (wDevID, (PWCHAR)dwParam1, dwParam2);
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);
}
......@@ -2133,12 +2131,6 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
return MMSYSERR_NOERROR;
}
static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid)
{
memcpy(pGuid, &DSDEVID_DefaultPlayback, sizeof(GUID));
return MMSYSERR_NOERROR;
}
#else /* !HAVE_ARTS */
/**************************************************************************
......
......@@ -182,8 +182,6 @@ 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);
static DWORD bytes_to_mmtime(LPMMTIME lpTime, DWORD position,
PCMWAVEFORMAT* format)
......@@ -1262,7 +1260,6 @@ DWORD WINAPI LIBAUDIOIO_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
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);
}
......@@ -1706,12 +1703,6 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
return MMSYSERR_NOERROR;
}
static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid)
{
memcpy(pGuid, &DSDEVID_DefaultPlayback, sizeof(GUID));
return MMSYSERR_NOERROR;
}
/*======================================================================*
* Low level WAVE IN implementation *
*======================================================================*/
......@@ -2258,7 +2249,6 @@ DWORD WINAPI LIBAUDIOIO_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
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);
}
......@@ -2285,12 +2275,6 @@ static DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc)
return MMSYSERR_NOERROR;
}
static DWORD widDsGuid(UINT wDevID, LPGUID pGuid)
{
memcpy(pGuid, &DSDEVID_DefaultCapture, sizeof(GUID));
return MMSYSERR_NOERROR;
}
#else /* HAVE_LIBAUDIOIO */
/**************************************************************************
......
......@@ -195,7 +195,6 @@ 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);
......@@ -1767,7 +1766,6 @@ DWORD WINAPI JACK_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case DRV_QUERYDEVICEINTERFACE: return wodDevInterface (wDevID, (PWCHAR)dwParam1, dwParam2);
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);
}
......@@ -1818,12 +1816,6 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
return MMSYSERR_NOERROR;
}
static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid)
{
memcpy(pGuid, &DSDEVID_DefaultPlayback, sizeof(GUID));
return MMSYSERR_NOERROR;
}
/*======================================================================*
* Low level WAVE IN implementation *
*======================================================================*/
......
......@@ -189,7 +189,6 @@ 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 */
......@@ -1286,7 +1285,6 @@ DWORD WINAPI NAS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
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);
}
......@@ -1313,12 +1311,6 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
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)))
......
......@@ -174,8 +174,6 @@ typedef struct tagOSS_DEVICE {
DSDRIVERDESC ds_desc;
DSDRIVERCAPS ds_caps;
DSCDRIVERCAPS dsc_caps;
GUID ds_guid;
GUID dsc_guid;
} OSS_DEVICE;
static OSS_DEVICE OSS_Devices[MAX_WAVEDRV];
......@@ -236,8 +234,6 @@ 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);
/* These strings used only for tracing */
static const char * getCmdString(enum win_wm_message msg)
......@@ -308,7 +304,6 @@ static const char * getMessage(UINT msg)
MSG_TO_STR(DRV_QUERYDEVICEINTERFACE);
MSG_TO_STR(DRV_QUERYDSOUNDIFACE);
MSG_TO_STR(DRV_QUERYDSOUNDDESC);
MSG_TO_STR(DRV_QUERYDSOUNDGUID);
}
#undef MSG_TO_STR
sprintf(unknown, "UNKNOWN(0x%04x)", msg);
......@@ -1166,11 +1161,6 @@ static void OSS_WaveFullDuplexInit(OSS_DEVICE* ossdev)
ossdev->duplex_out_caps.dwFormats, ossdev->duplex_out_caps.dwSupport);
}
#define INIT_GUID(guid, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
guid.Data1 = l; guid.Data2 = w1; guid.Data3 = w2; \
guid.Data4[0] = b1; guid.Data4[1] = b2; guid.Data4[2] = b3; \
guid.Data4[3] = b4; guid.Data4[4] = b5; guid.Data4[5] = b6; \
guid.Data4[6] = b7; guid.Data4[7] = b8;
/******************************************************************
* OSS_WaveInit
*
......@@ -1192,9 +1182,6 @@ LONG OSS_WaveInit(void)
}
sprintf(OSS_Devices[i].interface_name, "wineoss: %s", OSS_Devices[i].dev_name);
INIT_GUID(OSS_Devices[i].ds_guid, 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
INIT_GUID(OSS_Devices[i].dsc_guid, 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
}
/* start with output devices */
......@@ -2388,7 +2375,6 @@ DWORD WINAPI OSS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case DRV_QUERYDEVICEINTERFACE: return wdDevInterface (wDevID, (PWCHAR)dwParam1, dwParam2);
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);
}
......@@ -3293,13 +3279,6 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
return MMSYSERR_NOERROR;
}
static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid)
{
TRACE("(%d,%p)\n",wDevID,pGuid);
memcpy(pGuid, &(WOutDev[wDevID].ossdev->ds_guid), sizeof(GUID));
return MMSYSERR_NOERROR;
}
/*======================================================================*
* Low level WAVE IN implementation *
*======================================================================*/
......@@ -4038,7 +4017,6 @@ DWORD WINAPI OSS_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
case DRV_QUERYDEVICEINTERFACE: return wdDevInterface (wDevID, (PWCHAR)dwParam1, dwParam2);
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);
}
......@@ -4889,15 +4867,6 @@ static DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc)
return MMSYSERR_NOERROR;
}
static DWORD widDsGuid(UINT wDevID, LPGUID pGuid)
{
TRACE("(%d,%p)\n",wDevID,pGuid);
memcpy(pGuid, &(WInDev[wDevID].ossdev->dsc_guid), sizeof(GUID));
return MMSYSERR_NOERROR;
}
#else /* !HAVE_OSS */
/**************************************************************************
......
......@@ -91,7 +91,6 @@ typedef struct {
#ifdef __WINESRC__
#define DRV_QUERYDSOUNDIFACE (DRV_RESERVED + 20)
#define DRV_QUERYDSOUNDDESC (DRV_RESERVED + 21)
#define DRV_QUERYDSOUNDGUID (DRV_RESERVED + 22)
#endif
#define WODM_INIT DRVM_INIT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment