Ignore:
Timestamp:
Mar 9, 2009 1:08:16 PM (15 years ago)
Author:
bennylp
Message:

BIG refactoring in pjsua_media.c:

  • switchboard/conf detection is done at run-time, removing #ifdefs
    • use one function, open_snd_dev() to open device
    • use one function, create_aud_param() to initialize audio parameters:
      • get the default from device
      • override with user settings previously done with pjsua_snd_set_setting() (new API)
  • added new API to set/get sound device settings. The settings are

semi permanent, it will be used for future opening of sound dev:

  • pjsua_snd_set_setting()
  • pjsua_snd_get_setting()
  • snd_auto_close_time default value changed to 1 (from -1)
  • both pjsua_enum_snd_devs() and pjsua_enum_aud_devs() API are now

supported (previously it was done with #ifdef).

  • make_call() will not open the sound device is switchboard is

used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/aps-direct/pjsip/src/pjsua-lib/pjsua_call.c

    r2394 r2493  
    371371    PJSUA_LOCK(); 
    372372 
    373     /* Create sound port if none is instantiated */ 
    374     if (pjsua_var.snd_port==NULL && pjsua_var.null_snd==NULL &&  
    375         !pjsua_var.no_snd)  
     373    /* Create sound port if none is instantiated, to check if sound device 
     374     * can be used. But only do this with the conference bridge, as with  
     375     * audio switchboard (i.e. APS-Direct), we can only open the sound  
     376     * device once the correct format has been known 
     377     */ 
     378    if (!pjsua_var.is_mswitch && pjsua_var.snd_port==NULL &&  
     379        pjsua_var.null_snd==NULL && !pjsua_var.no_snd)  
    376380    { 
    377381        pj_status_t status; 
Note: See TracChangeset for help on using the changeset viewer.