Ignore:
Timestamp:
Feb 19, 2009 12:08:19 PM (12 years ago)
Author:
bennylp
Message:

Updated audio test

File:
1 edited

Legend:

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

    r2463 r2464  
    4545static struct aud_subsys 
    4646{ 
     47    unsigned         init_count; 
    4748    pj_pool_factory *pf; 
    4849    unsigned         factory_cnt; 
     
    6566    pj_status_t status = PJ_ENOMEM; 
    6667 
     68    /* Allow init() to be called multiple times as long as there is matching 
     69     * number of shutdown(). 
     70     */ 
     71    if (aud_subsys.init_count++ != 0) { 
     72        return PJ_SUCCESS; 
     73    } 
     74 
    6775    aud_subsys.pf = pf; 
    6876    aud_subsys.factory_cnt = 0; 
     
    101109{ 
    102110    unsigned i; 
     111 
     112    /* Allow shutdown() to be called multiple times as long as there is matching 
     113     * number of init(). 
     114     */ 
     115    if (aud_subsys.init_count == 0) { 
     116        return PJ_SUCCESS; 
     117    } 
     118    --aud_subsys.init_count; 
    103119 
    104120    for (i=0; i<aud_subsys.factory_cnt; ++i) { 
Note: See TracChangeset for help on using the changeset viewer.