Fix property set description for more than one capture device bug.
Add better traces messages.
This commit is contained in:
parent
b67da5b946
commit
48da1d52ad
|
@ -609,7 +609,10 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoicePlayback) ) {
|
||||
ULONG wod;
|
||||
unsigned int wodn;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
|
||||
if (IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultPlayback) )
|
||||
TRACE("DSDEVID_DefaultPlayback\n");
|
||||
else
|
||||
TRACE("DSDEVID_DefaultVoicePlayback\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
|
@ -655,7 +658,10 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoiceCapture) ) {
|
||||
ULONG wid;
|
||||
unsigned int widn;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
|
||||
if (IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultCapture) )
|
||||
TRACE("DSDEVID_DefaultCapture\n");
|
||||
else
|
||||
TRACE("DSDEVID_DefaultVoiceCapture\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
|
@ -702,11 +708,12 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
ULONG wod;
|
||||
unsigned int wodn;
|
||||
/* given specific device so try the render devices first */
|
||||
TRACE("Checking renderer devices\n");
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
|
||||
TRACE("DSOUND_renderer_guids[%ld]\n", wod);
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
ppd->WaveDeviceId = wod;
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -749,12 +756,13 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
|
|||
if (found == FALSE) {
|
||||
ULONG wid;
|
||||
unsigned int widn;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
|
||||
TRACE("Checking capture devices\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_capture_guids[wod] ) ) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_capture_guids[wid] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DSOUND_capture_guids[%ld]\n", wid);
|
||||
ppd->WaveDeviceId = wid;
|
||||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
if (err == DS_OK) {
|
||||
|
@ -842,12 +850,16 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoicePlayback) ) {
|
||||
ULONG wod;
|
||||
unsigned int wodn;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
|
||||
if (IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultPlayback) )
|
||||
TRACE("DSDEVID_DefaultPlayback\n");
|
||||
else
|
||||
TRACE("DSDEVID_DefaultVoicePlayback\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
if (IsEqualGUID( &dev_guid, &DSOUND_renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DSOUND_renderer_guids[%ld]\n", wod);
|
||||
ppd->WaveDeviceId = wod;
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
if (err == DS_OK) {
|
||||
|
@ -888,7 +900,10 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoiceCapture) ) {
|
||||
ULONG wid;
|
||||
unsigned int widn;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
|
||||
if (IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultCapture))
|
||||
TRACE("DSDEVID_DefaultCapture\n");
|
||||
else
|
||||
TRACE("DSDEVID_DefaultVoiceCapture\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
|
@ -934,12 +949,13 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
BOOL found = FALSE;
|
||||
ULONG wod;
|
||||
unsigned int wodn;
|
||||
TRACE("Checking renderer devices\n");
|
||||
/* given specific device so try the render devices first */
|
||||
wodn = waveOutGetNumDevs();
|
||||
for (wod = 0; wod < wodn; wod++) {
|
||||
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_renderer_guids[wod] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
|
||||
TRACE("DSOUND_renderer_guids[%ld]\n", wod);
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
|
||||
ppd->WaveDeviceId = wod;
|
||||
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
|
@ -982,12 +998,13 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
|
|||
if (found == FALSE) {
|
||||
ULONG wid;
|
||||
unsigned int widn;
|
||||
TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
|
||||
TRACE("Checking capture devices\n");
|
||||
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
|
||||
widn = waveInGetNumDevs();
|
||||
for (wid = 0; wid < widn; wid++) {
|
||||
if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) {
|
||||
DSDRIVERDESC desc;
|
||||
TRACE("DSOUND_capture_guids[%ld]\n", wid);
|
||||
ppd->WaveDeviceId = wid;
|
||||
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
|
||||
if (err == DS_OK) {
|
||||
|
|
Loading…
Reference in New Issue