Changeset 1422 for pjproject/trunk
- Timestamp:
- Aug 22, 2007 12:34:48 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/dsound.c
r1421 r1422 52 52 { 53 53 pjmedia_snd_dev_info info; 54 LPGUID lpGuid; 54 55 GUID guid; 55 56 }; … … 159 160 * Create DirectSound device. 160 161 */ 161 hr = DirectSoundCreate( &dev_info[dev_id].guid, &ds_strm->ds.play.lpDs,162 hr = DirectSoundCreate(dev_info[dev_id].lpGuid, &ds_strm->ds.play.lpDs, 162 163 NULL); 163 164 if (FAILED(hr)) … … 278 279 * Creating recorder device. 279 280 */ 280 hr = DirectSoundCaptureCreate( &dev_info[dev_id].guid,281 hr = DirectSoundCaptureCreate(dev_info[dev_id].lpGuid, 281 282 &ds_strm->ds.capture.lpDs, NULL); 282 283 if (FAILED(hr)) … … 602 603 */ 603 604 for (index=0; index<dev_count; ++index) { 604 if (pj_memcmp(&dev_info[index].guid, lpGuid, sizeof(GUID))==0) 605 if ((dev_info[index].lpGuid==NULL && lpGuid==NULL) || 606 pj_memcmp(&dev_info[index].guid, lpGuid, sizeof(GUID))==0) 607 { 605 608 break; 609 } 606 610 } 607 611 … … 617 621 strncpy(dev_info[index].info.name, lpcstrDescription, max); 618 622 dev_info[index].info.name[max-1] = '\0'; 619 pj_memcpy(&dev_info[index].guid, lpGuid, sizeof(GUID)); 623 if (lpGuid == NULL) { 624 dev_info[index].lpGuid = NULL; 625 } else { 626 pj_memcpy(&dev_info[index].guid, lpGuid, sizeof(GUID)); 627 dev_info[index].lpGuid = &dev_info[index].guid; 628 } 620 629 dev_info[index].info.default_samples_per_sec = 44100; 621 630
Note: See TracChangeset
for help on using the changeset viewer.