Remove wine specific DRV_QUERYDSOUNDGUID message and calculate it in
dsound.dll (like in 2k/xp).
This commit is contained in:
parent
93010bf32f
commit
7bf4eee7ad
|
@ -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,12 +209,9 @@ 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);
|
||||
|
@ -226,7 +219,6 @@ DirectSoundCaptureEnumerateA(
|
|||
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,12 +275,9 @@ 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);
|
||||
|
@ -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);
|
||||
|
|
|
@ -378,9 +378,7 @@ static HRESULT WINAPI DSPROPERTY_Description1(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDGUID,(DWORD)(&guid),0));
|
||||
if (err == DS_OK) {
|
||||
if (IsEqualGUID( &dev_guid, &guid) ) {
|
||||
if (IsEqualGUID( &dev_guid, &renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wod;
|
||||
ppd->Devnode = wod;
|
||||
|
@ -400,10 +398,6 @@ static HRESULT WINAPI DSPROPERTY_Description1(
|
|||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
WARN("waveOutMessage failed\n");
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else if ( IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultCapture) ||
|
||||
IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoiceCapture) ) {
|
||||
|
@ -413,8 +407,6 @@ static HRESULT WINAPI DSPROPERTY_Description1(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDGUID,(DWORD)(&guid),0));
|
||||
if (err == DS_OK) {
|
||||
if (IsEqualGUID( &dev_guid, &guid) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wid;
|
||||
|
@ -434,11 +426,6 @@ static HRESULT WINAPI DSPROPERTY_Description1(
|
|||
WARN("waveInMessage failed\n");
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
WARN("waveInMessage failed\n");
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -448,9 +435,7 @@ static HRESULT WINAPI DSPROPERTY_Description1(
|
|||
/* given specific device so try the render devices first */
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDGUID,(DWORD)(&guid),0));
|
||||
if (err == DS_OK) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &guid) ) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
|
@ -473,17 +458,45 @@ static HRESULT WINAPI DSPROPERTY_Description1(
|
|||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (found == FALSE) {
|
||||
ULONG wid;
|
||||
int widn;
|
||||
/* given specific device so try the capture devices next */
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &capture_guids[wid] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
ppd->WaveDeviceId = wid;
|
||||
ppd->Devnode = wid;
|
||||
err = mmErr(waveInMessage((HWAVEIN)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
if (err == DS_OK) {
|
||||
PIDSDRIVER drv = NULL;
|
||||
strncpy(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA) - 1);
|
||||
strncpy(ppd->ModuleA, desc.szDrvName, sizeof(ppd->ModuleA) - 1);
|
||||
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
|
||||
MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
|
||||
err = mmErr(waveInMessage((HWAVEIN)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
|
||||
if (err == DS_OK && drv)
|
||||
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
|
||||
found = TRUE;
|
||||
break;
|
||||
} else {
|
||||
WARN("waveOutMessage failed\n");
|
||||
WARN("waveInMessage failed\n");
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (found == FALSE) {
|
||||
WARN("device not found\n");
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pcbReturned) {
|
||||
*pcbReturned = cbPropData;
|
||||
|
@ -501,7 +514,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
{
|
||||
PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA) pPropData;
|
||||
HRESULT err;
|
||||
GUID guid, dev_guid;
|
||||
GUID dev_guid;
|
||||
TRACE("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
|
||||
debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
|
||||
|
||||
|
@ -531,9 +544,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDGUID,(DWORD)(&guid),0));
|
||||
if (err == DS_OK) {
|
||||
if (IsEqualGUID( &dev_guid, &guid) ) {
|
||||
if (IsEqualGUID( &dev_guid, &renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wod;
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -560,10 +571,6 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
WARN("waveOutMessage failed\n");
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else if (IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultCapture) ||
|
||||
IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoiceCapture) ) {
|
||||
|
@ -573,9 +580,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDGUID,(DWORD)(&guid),0));
|
||||
if (err == DS_OK) {
|
||||
if (IsEqualGUID( &dev_guid, &guid) ) {
|
||||
if (IsEqualGUID( &dev_guid, &capture_guids[wid] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wid;
|
||||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -603,10 +608,6 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
WARN("waveOutMessage failed\n");
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
BOOL found = FALSE;
|
||||
|
@ -615,9 +616,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
/* given specific device so try the render devices first */
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDGUID,(DWORD)(&guid),0));
|
||||
if (err == DS_OK) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &guid) ) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
|
@ -647,10 +646,6 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
WARN("waveOutMessage failed\n");
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
|
||||
if (found == FALSE) {
|
||||
|
@ -675,7 +670,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
{
|
||||
PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA) pPropData;
|
||||
HRESULT err;
|
||||
GUID guid, dev_guid;
|
||||
GUID dev_guid;
|
||||
TRACE("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
|
||||
debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
|
||||
|
||||
|
@ -705,9 +700,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDGUID,(DWORD)(&guid),0));
|
||||
if (err == DS_OK) {
|
||||
if (IsEqualGUID( &dev_guid, &guid) ) {
|
||||
if (IsEqualGUID( &dev_guid, &renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wod;
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -734,10 +727,6 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
WARN("waveOutMessage failed\n");
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else if (IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultCapture) ||
|
||||
IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoiceCapture) ) {
|
||||
|
@ -747,9 +736,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDGUID,(DWORD)(&guid),0));
|
||||
if (err == DS_OK) {
|
||||
if (IsEqualGUID( &dev_guid, &guid) ) {
|
||||
if (IsEqualGUID( &dev_guid, &capture_guids[wid] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wid;
|
||||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -777,10 +764,6 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
WARN("waveInMessage failed\n");
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
BOOL found = FALSE;
|
||||
|
@ -789,9 +772,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
/* given specific device so try the render devices first */
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDGUID,(DWORD)(&guid),0));
|
||||
if (err == DS_OK) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &guid) ) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
|
@ -821,10 +802,6 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
WARN("waveOutMessage failed\n");
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
|
||||
if (found == FALSE) {
|
||||
|
@ -868,19 +845,16 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
|
|||
if (ppd->Callback) {
|
||||
unsigned devs, wod, wid;
|
||||
DSDRIVERDESC desc;
|
||||
GUID guid;
|
||||
DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA data;
|
||||
|
||||
devs = waveOutGetNumDevs();
|
||||
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)&guid,0));
|
||||
if (err == DS_OK) {
|
||||
memset(&data, 0, sizeof(data));
|
||||
data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
data.WaveDeviceId = wod;
|
||||
data.DeviceId = guid;
|
||||
data.DeviceId = renderer_guids[wod];
|
||||
data.Description = desc.szDesc;
|
||||
data.Module = desc.szDrvName;
|
||||
data.Interface = "Interface";
|
||||
|
@ -888,18 +862,15 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
|
|||
(ppd->Callback)(&data, ppd->Context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
devs = waveInGetNumDevs();
|
||||
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)&guid,0));
|
||||
if (err == DS_OK) {
|
||||
memset(&data, 0, sizeof(data));
|
||||
data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
data.WaveDeviceId = wid;
|
||||
data.DeviceId = guid;
|
||||
data.DeviceId = capture_guids[wid];
|
||||
data.Description = desc.szDesc;
|
||||
data.Module = desc.szDrvName;
|
||||
data.Interface = "Interface";
|
||||
|
@ -907,7 +878,6 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
|
|||
(ppd->Callback)(&data, ppd->Context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -940,14 +910,11 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
|
|||
if (ppd->Callback) {
|
||||
unsigned devs, wod, wid;
|
||||
DSDRIVERDESC desc;
|
||||
GUID guid;
|
||||
DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data;
|
||||
|
||||
devs = waveOutGetNumDevs();
|
||||
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)&guid,0));
|
||||
if (err == DS_OK) {
|
||||
/* FIXME: this is a memory leak */
|
||||
WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200);
|
||||
|
@ -957,7 +924,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
|
|||
memset(&data, 0, sizeof(data));
|
||||
data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
data.WaveDeviceId = wod;
|
||||
data.DeviceId = guid;
|
||||
data.DeviceId = renderer_guids[wod];
|
||||
|
||||
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, wDescription, 0x100 );
|
||||
MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, wModule, 0x100 );
|
||||
|
@ -970,13 +937,10 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
|
|||
(ppd->Callback)(&data, ppd->Context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
devs = waveInGetNumDevs();
|
||||
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)&guid,0));
|
||||
if (err == DS_OK) {
|
||||
/* FIXME: this is a memory leak */
|
||||
WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200);
|
||||
|
@ -986,7 +950,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
|
|||
memset(&data, 0, sizeof(data));
|
||||
data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
data.WaveDeviceId = wid;
|
||||
data.DeviceId = guid;
|
||||
data.DeviceId = capture_guids[wid];
|
||||
|
||||
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, wDescription, 0x100 );
|
||||
MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, wModule, 0x100 );
|
||||
|
@ -999,7 +963,6 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
|
|||
(ppd->Callback)(&data, ppd->Context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -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 *
|
||||
*======================================================================*/
|
||||
|
@ -3550,18 +3529,6 @@ static DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* 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.@)
|
||||
*/
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue