Ignore:
Timestamp:
Feb 22, 2009 12:00:12 PM (15 years ago)
Author:
bennylp
Message:
  • New convention about default audio device ID (now there is different ID for default capture/playback device. It should be backward compatible)
  • Fixed crash if sound port is unable to open sound device
  • Testing with the switchboard
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia/sound_port.c

    r2468 r2469  
    414414{ 
    415415    pjmedia_snd_port *snd_port; 
     416    pj_status_t status; 
    416417 
    417418    PJ_ASSERT_RETURN(pool && prm && p_port, PJ_EINVAL); 
     
    430431    pj_memcpy(&snd_port->aud_param, prm, sizeof(*prm)); 
    431432     
    432     *p_port = snd_port; 
    433  
    434  
    435433    /* Start sound device immediately. 
    436434     * If there's no port connected, the sound callback will return 
    437435     * empty signal. 
    438436     */ 
    439     return start_sound_device( pool, snd_port ); 
    440  
     437    status = start_sound_device( pool, snd_port ); 
     438    if (status != PJ_SUCCESS) { 
     439        pjmedia_snd_port_destroy(snd_port); 
     440        return status; 
     441    } 
     442 
     443    *p_port = snd_port; 
     444    return PJ_SUCCESS; 
    441445} 
    442446 
Note: See TracChangeset for help on using the changeset viewer.