Change some global variable names.
Cleanup usage of global dsound variable to not use local variable of same name. Almost ready to add support for more than one sound card at the same time.
This commit is contained in:
parent
a812b61d0a
commit
7f6536c504
|
@ -186,7 +186,7 @@ DirectSoundCaptureEnumerateA(
|
|||
if (devs > 0) {
|
||||
if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) {
|
||||
for (wid = 0; wid < devs; ++wid) {
|
||||
if (IsEqualGUID( &guid, &capture_guids[wid] ) ) {
|
||||
if (IsEqualGUID( &guid, &DSOUND_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",
|
||||
|
@ -203,8 +203,8 @@ DirectSoundCaptureEnumerateA(
|
|||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,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)
|
||||
debugstr_guid(&DSOUND_capture_guids[wid]),desc.szDesc,desc.szDrvname,lpContext);
|
||||
if (lpDSEnumCallback(&DSOUND_capture_guids[wid], desc.szDesc, desc.szDrvname, lpContext) == FALSE)
|
||||
return DS_OK;
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ DirectSoundCaptureEnumerateW(
|
|||
if (devs > 0) {
|
||||
if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) {
|
||||
for (wid = 0; wid < devs; ++wid) {
|
||||
if (IsEqualGUID( &guid, &capture_guids[wid] ) ) {
|
||||
if (IsEqualGUID( &guid, &DSOUND_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",
|
||||
|
@ -269,12 +269,12 @@ DirectSoundCaptureEnumerateW(
|
|||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
|
||||
if (err == DS_OK) {
|
||||
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
|
||||
debugstr_guid(&capture_guids[wid]),desc.szDesc,desc.szDrvname,lpContext);
|
||||
debugstr_guid(&DSOUND_capture_guids[wid]),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((LPGUID)&capture_guids[wid], wDesc, wName, lpContext) == FALSE)
|
||||
if (lpDSEnumCallback((LPGUID)&DSOUND_capture_guids[wid], wDesc, wName, lpContext) == FALSE)
|
||||
return DS_OK;
|
||||
}
|
||||
}
|
||||
|
@ -509,7 +509,7 @@ IDirectSoundCaptureImpl_Initialize(
|
|||
|
||||
/* enumerate WINMM audio devices and find the one we want */
|
||||
for (wid=0; wid<widn; wid++) {
|
||||
if (IsEqualGUID( lpcGUID, &capture_guids[wid]) ) {
|
||||
if (IsEqualGUID( lpcGUID, &DSOUND_capture_guids[wid]) ) {
|
||||
err = DS_OK;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ static ULONG WINAPI IDirectSoundImpl_Release(
|
|||
This->mixlock.DebugInfo->Spare[1] = 0;
|
||||
DeleteCriticalSection(&This->mixlock);
|
||||
HeapFree(GetProcessHeap(),0,This);
|
||||
dsound = NULL;
|
||||
DSOUND_renderer = NULL;
|
||||
TRACE("(%p) released\n", This);
|
||||
}
|
||||
return ref;
|
||||
|
@ -748,7 +748,7 @@ HRESULT WINAPI IDirectSoundImpl_Create(
|
|||
TRACE(" expecting GUID %s.\n", debugstr_guid(lpcGUID));
|
||||
|
||||
for (wod=0; wod<wodn; wod++) {
|
||||
if (IsEqualGUID( lpcGUID, &renderer_guids[wod])) {
|
||||
if (IsEqualGUID( lpcGUID, &DSOUND_renderer_guids[wod])) {
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
|
@ -1633,9 +1633,9 @@ HRESULT WINAPI DSOUND_Create(
|
|||
return DSERR_INVALIDPARAM;
|
||||
}
|
||||
|
||||
if (dsound) {
|
||||
if (IsEqualGUID(&devGuid, &dsound->guid)) {
|
||||
hr = IDirectSound_IDirectSound_Create((LPDIRECTSOUND8)dsound, ppDS);
|
||||
if (DSOUND_renderer) {
|
||||
if (IsEqualGUID(&devGuid, &DSOUND_renderer->guid)) {
|
||||
hr = IDirectSound_IDirectSound_Create((LPDIRECTSOUND8)DSOUND_renderer, ppDS);
|
||||
if (*ppDS)
|
||||
IDirectSound_IDirectSound_AddRef(*ppDS);
|
||||
else
|
||||
|
@ -1655,10 +1655,10 @@ HRESULT WINAPI DSOUND_Create(
|
|||
if (*ppDS) {
|
||||
IDirectSound_IDirectSound_AddRef(*ppDS);
|
||||
|
||||
dsound = (IDirectSoundImpl*)pDS;
|
||||
DSOUND_renderer = (IDirectSoundImpl*)pDS;
|
||||
timeBeginPeriod(DS_TIME_RES);
|
||||
dsound->timerID = timeSetEvent(DS_TIME_DEL, DS_TIME_RES, DSOUND_timer,
|
||||
(DWORD)dsound, TIME_PERIODIC | TIME_CALLBACK_FUNCTION);
|
||||
DSOUND_renderer->timerID = timeSetEvent(DS_TIME_DEL, DS_TIME_RES, DSOUND_timer,
|
||||
(DWORD)DSOUND_renderer, TIME_PERIODIC | TIME_CALLBACK_FUNCTION);
|
||||
} else {
|
||||
WARN("IDirectSound_IDirectSound_Create failed\n");
|
||||
IDirectSound8_Release(pDS);
|
||||
|
@ -1700,7 +1700,7 @@ HRESULT WINAPI DirectSoundCreate(
|
|||
|
||||
hr = DSOUND_Create(lpcGUID, ppDS, pUnkOuter);
|
||||
if (hr == DS_OK)
|
||||
IDirectSoundImpl_Initialize((LPDIRECTSOUND8)dsound, lpcGUID);
|
||||
IDirectSound_Initialize(*ppDS, lpcGUID);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
@ -1738,9 +1738,9 @@ HRESULT WINAPI DSOUND_Create8(
|
|||
return DSERR_INVALIDPARAM;
|
||||
}
|
||||
|
||||
if (dsound) {
|
||||
if (IsEqualGUID(&devGuid, &dsound->guid)) {
|
||||
hr = IDirectSound8_IDirectSound8_Create((LPDIRECTSOUND8)dsound, ppDS);
|
||||
if (DSOUND_renderer) {
|
||||
if (IsEqualGUID(&devGuid, &DSOUND_renderer->guid)) {
|
||||
hr = IDirectSound8_IDirectSound8_Create((LPDIRECTSOUND8)DSOUND_renderer, ppDS);
|
||||
if (*ppDS)
|
||||
IDirectSound8_IDirectSound8_AddRef(*ppDS);
|
||||
else
|
||||
|
@ -1760,10 +1760,10 @@ HRESULT WINAPI DSOUND_Create8(
|
|||
if (*ppDS) {
|
||||
IDirectSound8_IDirectSound8_AddRef(*ppDS);
|
||||
|
||||
dsound = (IDirectSoundImpl*)pDS;
|
||||
DSOUND_renderer = (IDirectSoundImpl*)pDS;
|
||||
timeBeginPeriod(DS_TIME_RES);
|
||||
dsound->timerID = timeSetEvent(DS_TIME_DEL, DS_TIME_RES, DSOUND_timer,
|
||||
(DWORD)dsound, TIME_PERIODIC | TIME_CALLBACK_FUNCTION);
|
||||
DSOUND_renderer->timerID = timeSetEvent(DS_TIME_DEL, DS_TIME_RES, DSOUND_timer,
|
||||
(DWORD)DSOUND_renderer, TIME_PERIODIC | TIME_CALLBACK_FUNCTION);
|
||||
} else {
|
||||
WARN("IDirectSound8_IDirectSound8_Create failed\n");
|
||||
IDirectSound8_Release(pDS);
|
||||
|
@ -1805,7 +1805,7 @@ HRESULT WINAPI DirectSoundCreate8(
|
|||
|
||||
hr = DSOUND_Create8(lpcGUID, ppDS, pUnkOuter);
|
||||
if (hr == DS_OK)
|
||||
IDirectSoundImpl_Initialize((LPDIRECTSOUND8)dsound, lpcGUID);
|
||||
IDirectSound8_Initialize(*ppDS, lpcGUID);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -68,9 +68,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound);
|
|||
#define DS_SND_QUEUE_MAX 28 /* max number of fragments to prebuffer */
|
||||
#define DS_SND_QUEUE_MIN 12 /* min number of fragments to prebuffer */
|
||||
|
||||
IDirectSoundImpl* dsound = NULL;
|
||||
GUID renderer_guids[MAXWAVEDRIVERS];
|
||||
GUID capture_guids[MAXWAVEDRIVERS];
|
||||
IDirectSoundImpl* DSOUND_renderer = NULL;
|
||||
GUID DSOUND_renderer_guids[MAXWAVEDRIVERS];
|
||||
GUID DSOUND_capture_guids[MAXWAVEDRIVERS];
|
||||
|
||||
HRESULT mmErr(UINT err)
|
||||
{
|
||||
|
@ -268,14 +268,14 @@ HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest)
|
|||
|
||||
if ( IsEqualGUID( &DSDEVID_DefaultPlayback, pGuidSrc ) ||
|
||||
IsEqualGUID( &DSDEVID_DefaultVoicePlayback, pGuidSrc ) ) {
|
||||
CopyMemory(pGuidDest, &renderer_guids[ds_default_playback], sizeof(GUID));
|
||||
CopyMemory(pGuidDest, &DSOUND_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 ) ) {
|
||||
CopyMemory(pGuidDest, &capture_guids[ds_default_capture], sizeof(GUID));
|
||||
CopyMemory(pGuidDest, &DSOUND_capture_guids[ds_default_capture], sizeof(GUID));
|
||||
TRACE("returns %s\n", get_device_id(pGuidDest));
|
||||
return DS_OK;
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ HRESULT WINAPI DirectSoundEnumerateA(
|
|||
if (devs > 0) {
|
||||
if (GetDeviceID(&DSDEVID_DefaultPlayback, &guid) == DS_OK) {
|
||||
for (wod = 0; wod < devs; ++wod) {
|
||||
if (IsEqualGUID( &guid, &renderer_guids[wod]) ) {
|
||||
if (IsEqualGUID( &guid, &DSOUND_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",
|
||||
|
@ -338,8 +338,8 @@ HRESULT WINAPI DirectSoundEnumerateA(
|
|||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
|
||||
if (err == DS_OK) {
|
||||
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
|
||||
debugstr_guid(&renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);
|
||||
if (lpDSEnumCallback(&renderer_guids[wod], desc.szDesc, desc.szDrvname, lpContext) == FALSE)
|
||||
debugstr_guid(&DSOUND_renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);
|
||||
if (lpDSEnumCallback(&DSOUND_renderer_guids[wod], desc.szDesc, desc.szDrvname, lpContext) == FALSE)
|
||||
return DS_OK;
|
||||
}
|
||||
}
|
||||
|
@ -382,7 +382,7 @@ HRESULT WINAPI DirectSoundEnumerateW(
|
|||
if (devs > 0) {
|
||||
if (GetDeviceID(&DSDEVID_DefaultPlayback, &guid) == DS_OK) {
|
||||
for (wod = 0; wod < devs; ++wod) {
|
||||
if (IsEqualGUID( &guid, &renderer_guids[wod] ) ) {
|
||||
if (IsEqualGUID( &guid, &DSOUND_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",
|
||||
|
@ -403,12 +403,12 @@ HRESULT WINAPI DirectSoundEnumerateW(
|
|||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
|
||||
if (err == DS_OK) {
|
||||
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
|
||||
debugstr_guid(&renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);
|
||||
debugstr_guid(&DSOUND_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(&renderer_guids[wod], wDesc, wName, lpContext) == FALSE)
|
||||
if (lpDSEnumCallback(&DSOUND_renderer_guids[wod], wDesc, wName, lpContext) == FALSE)
|
||||
return DS_OK;
|
||||
}
|
||||
}
|
||||
|
@ -665,8 +665,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
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);
|
||||
INIT_GUID(DSOUND_renderer_guids[i], 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
|
||||
INIT_GUID(DSOUND_capture_guids[i], 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
|
||||
}
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
|
|
|
@ -494,10 +494,9 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb);
|
|||
|
||||
#define DSOUND_FREQSHIFT (14)
|
||||
|
||||
extern IDirectSoundImpl* dsound;
|
||||
|
||||
extern GUID renderer_guids[MAXWAVEDRIVERS];
|
||||
extern GUID capture_guids[MAXWAVEDRIVERS];
|
||||
extern IDirectSoundImpl* DSOUND_renderer;
|
||||
extern GUID DSOUND_renderer_guids[MAXWAVEDRIVERS];
|
||||
extern GUID DSOUND_capture_guids[MAXWAVEDRIVERS];
|
||||
|
||||
extern HRESULT mmErr(UINT err);
|
||||
extern void setup_dsound_options(void);
|
||||
|
|
|
@ -1115,7 +1115,7 @@ void CALLBACK DSOUND_timer(UINT timerID, UINT msg, DWORD dwUser, DWORD dw1, DWOR
|
|||
TRACE("(%d,%d,0x%lx,0x%lx,0x%lx)\n",timerID,msg,dwUser,dw1,dw2);
|
||||
TRACE("entering at %ld\n", start_time);
|
||||
|
||||
if (dsound != This) {
|
||||
if (DSOUND_renderer != This) {
|
||||
ERR("dsound died without killing us?\n");
|
||||
timeKillEvent(timerID);
|
||||
timeEndPeriod(DS_TIME_RES);
|
||||
|
|
|
@ -130,8 +130,8 @@ static HRESULT DSOUND_PrimaryOpen(IDirectSoundImpl *This)
|
|||
return err;
|
||||
}
|
||||
|
||||
if (dsound->state == STATE_PLAYING) dsound->state = STATE_STARTING;
|
||||
else if (dsound->state == STATE_STOPPING) dsound->state = STATE_STOPPED;
|
||||
if (This->state == STATE_PLAYING) This->state = STATE_STARTING;
|
||||
else if (This->state == STATE_STOPPING) This->state = STATE_STOPPED;
|
||||
}
|
||||
|
||||
return err;
|
||||
|
@ -492,7 +492,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetVolume(
|
|||
return DSERR_INVALIDPARAM;
|
||||
}
|
||||
|
||||
waveOutGetVolume(dsound->hwo, &factors);
|
||||
waveOutGetVolume(This->dsound->hwo, &factors);
|
||||
volpan.dwTotalLeftAmpFactor=ampfactors & 0xffff;
|
||||
volpan.dwTotalRightAmpFactor=ampfactors >> 16;
|
||||
DSOUND_AmpFactorToVolPan(&volpan);
|
||||
|
@ -813,7 +813,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetPan(
|
|||
return DSERR_INVALIDPARAM;
|
||||
}
|
||||
|
||||
waveOutGetVolume(dsound->hwo, &factors);
|
||||
waveOutGetVolume(This->dsound->hwo, &factors);
|
||||
volpan.dwTotalLeftAmpFactor=ampfactors & 0xffff;
|
||||
volpan.dwTotalRightAmpFactor=ampfactors >> 16;
|
||||
DSOUND_AmpFactorToVolPan(&volpan);
|
||||
|
|
|
@ -377,7 +377,7 @@ static HRESULT WINAPI DSPROPERTY_Description1(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
if (IsEqualGUID( &dev_guid, &renderer_guids[wod] ) ) {
|
||||
if (IsEqualGUID( &dev_guid, &DSOUND_renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wod;
|
||||
ppd->Devnode = wod;
|
||||
|
@ -438,7 +438,7 @@ static HRESULT WINAPI DSPROPERTY_Description1(
|
|||
/* given specific device so try the render devices first */
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &renderer_guids[wod] ) ) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
|
@ -471,7 +471,7 @@ static HRESULT WINAPI DSPROPERTY_Description1(
|
|||
/* given specific device so try the capture devices next */
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &capture_guids[wid] ) ) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_capture_guids[wid] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
|
@ -551,7 +551,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
if (IsEqualGUID( &dev_guid, &renderer_guids[wod] ) ) {
|
||||
if (IsEqualGUID( &dev_guid, &DSOUND_renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wod;
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -597,7 +597,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
if (IsEqualGUID( &dev_guid, &capture_guids[wid] ) ) {
|
||||
if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wid;
|
||||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -642,7 +642,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
/* given specific device so try the render devices first */
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &renderer_guids[wod] ) ) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
|
@ -691,7 +691,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &capture_guids[wod] ) ) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_capture_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wid;
|
||||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -784,7 +784,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
if (IsEqualGUID( &dev_guid, &renderer_guids[wod] ) ) {
|
||||
if (IsEqualGUID( &dev_guid, &DSOUND_renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wod;
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -830,7 +830,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
if (IsEqualGUID( &dev_guid, &capture_guids[wid] ) ) {
|
||||
if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wid;
|
||||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -875,7 +875,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
/* given specific device so try the render devices first */
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &renderer_guids[wod] ) ) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
|
@ -924,7 +924,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
if (IsEqualGUID( &dev_guid, &capture_guids[wid] ) ) {
|
||||
if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
ppd->WaveDeviceId = wid;
|
||||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -1004,7 +1004,7 @@ static HRESULT WINAPI DSPROPERTY_Enumerate1(
|
|||
ZeroMemory(&data, sizeof(data));
|
||||
data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
data.WaveDeviceId = wod;
|
||||
data.DeviceId = renderer_guids[wod];
|
||||
data.DeviceId = DSOUND_renderer_guids[wod];
|
||||
strncpy(data.DescriptionA, desc.szDesc, sizeof(data.DescriptionA));
|
||||
strncpy(data.ModuleA, desc.szDrvname, sizeof(data.ModuleA));
|
||||
|
||||
|
@ -1023,7 +1023,7 @@ static HRESULT WINAPI DSPROPERTY_Enumerate1(
|
|||
ZeroMemory(&data, sizeof(data));
|
||||
data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
data.WaveDeviceId = wod;
|
||||
data.DeviceId = renderer_guids[wod];
|
||||
data.DeviceId = DSOUND_renderer_guids[wod];
|
||||
strncpy(data.DescriptionA, desc.szDesc, sizeof(data.DescriptionA));
|
||||
strncpy(data.ModuleA, desc.szDrvname, sizeof(data.ModuleA));
|
||||
|
||||
|
@ -1084,7 +1084,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
|
|||
ZeroMemory(&data, sizeof(data));
|
||||
data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
data.WaveDeviceId = wod;
|
||||
data.DeviceId = renderer_guids[wod];
|
||||
data.DeviceId = DSOUND_renderer_guids[wod];
|
||||
data.Description = desc.szDesc;
|
||||
data.Module = desc.szDrvname;
|
||||
WideCharToMultiByte( CP_ACP, 0, nameW, size/sizeof(WCHAR), szInterface, size/sizeof(WCHAR), NULL, NULL );
|
||||
|
@ -1118,7 +1118,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
|
|||
ZeroMemory(&data, sizeof(data));
|
||||
data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
data.WaveDeviceId = wid;
|
||||
data.DeviceId = capture_guids[wid];
|
||||
data.DeviceId = DSOUND_capture_guids[wid];
|
||||
data.Description = desc.szDesc;
|
||||
data.Module = desc.szDrvname;
|
||||
WideCharToMultiByte( CP_ACP, 0, nameW, size/sizeof(WCHAR), szInterface, size/sizeof(WCHAR), NULL, NULL );
|
||||
|
@ -1186,7 +1186,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
|
|||
ZeroMemory(&data, sizeof(data));
|
||||
data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
data.WaveDeviceId = wod;
|
||||
data.DeviceId = renderer_guids[wod];
|
||||
data.DeviceId = DSOUND_renderer_guids[wod];
|
||||
|
||||
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, wDescription, 0x100 );
|
||||
MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, wModule, 0x100 );
|
||||
|
@ -1224,7 +1224,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
|
|||
ZeroMemory(&data, sizeof(data));
|
||||
data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
data.WaveDeviceId = wid;
|
||||
data.DeviceId = capture_guids[wid];
|
||||
data.DeviceId = DSOUND_capture_guids[wid];
|
||||
|
||||
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, wDescription, 0x100 );
|
||||
MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, wModule, 0x100 );
|
||||
|
|
Loading…
Reference in New Issue