Changeset 1421


Ignore:
Timestamp:
Aug 17, 2007 9:49:06 AM (17 years ago)
Author:
bennylp
Message:

Fixed bug in dsound.c: device GUID refered to local variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/dsound.c

    r1041 r1421  
    5252{ 
    5353    pjmedia_snd_dev_info    info; 
    54     LPGUID                  lpGuid; 
     54    GUID                    guid; 
    5555}; 
    5656 
     
    159159     * Create DirectSound device. 
    160160     */ 
    161     hr = DirectSoundCreate(dev_info[dev_id].lpGuid, &ds_strm->ds.play.lpDs,  
     161    hr = DirectSoundCreate(&dev_info[dev_id].guid, &ds_strm->ds.play.lpDs,  
    162162                           NULL); 
    163163    if (FAILED(hr)) 
     
    278278     * Creating recorder device. 
    279279     */ 
    280     hr = DirectSoundCaptureCreate(dev_info[dev_id].lpGuid,  
     280    hr = DirectSoundCaptureCreate(&dev_info[dev_id].guid,  
    281281                                  &ds_strm->ds.capture.lpDs, NULL); 
    282282    if (FAILED(hr)) 
     
    602602     */ 
    603603    for (index=0; index<dev_count; ++index) { 
    604         if (dev_info[index].lpGuid == lpGuid) 
     604        if (pj_memcmp(&dev_info[index].guid, lpGuid, sizeof(GUID))==0) 
    605605            break; 
    606606    } 
     
    617617    strncpy(dev_info[index].info.name, lpcstrDescription, max); 
    618618    dev_info[index].info.name[max-1] = '\0'; 
    619     dev_info[index].lpGuid = lpGuid; 
     619    pj_memcpy(&dev_info[index].guid, lpGuid, sizeof(GUID)); 
    620620    dev_info[index].info.default_samples_per_sec = 44100; 
    621621     
Note: See TracChangeset for help on using the changeset viewer.