Ignore:
Timestamp:
Feb 27, 2014 10:53:15 AM (11 years ago)
Author:
nanang
Message:

Fix #1741: fixed AudioMedia? in setting signal level adjustment and querying signal level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua2/media.cpp

    r4708 r4771  
    206206void AudioMedia::adjustRxLevel(float level) throw(Error) 
    207207{ 
     208    PJSUA2_CHECK_EXPR( pjsua_conf_adjust_tx_level(id, level) ); 
     209} 
     210 
     211void AudioMedia::adjustTxLevel(float level) throw(Error) 
     212{ 
    208213    PJSUA2_CHECK_EXPR( pjsua_conf_adjust_rx_level(id, level) ); 
    209214} 
    210215 
    211 void AudioMedia::adjustTxLevel(float level) throw(Error) 
    212 { 
    213     PJSUA2_CHECK_EXPR( pjsua_conf_adjust_tx_level(id, level) ); 
    214 } 
    215  
    216216unsigned AudioMedia::getRxLevel() const throw(Error) 
    217217{ 
    218     return getSignalLevel(true); 
     218    unsigned level; 
     219    PJSUA2_CHECK_EXPR( pjsua_conf_get_signal_level(id, &level, NULL) ); 
     220    return level; 
    219221} 
    220222 
    221223unsigned AudioMedia::getTxLevel() const throw(Error) 
    222224{ 
    223     return getSignalLevel(false); 
    224 } 
    225  
    226 unsigned AudioMedia::getSignalLevel(bool is_rx) const throw(Error) 
    227 {     
    228     unsigned rx_level; 
    229     unsigned tx_level; 
    230      
    231     PJSUA2_CHECK_EXPR( pjsua_conf_get_signal_level(id, &tx_level, &rx_level) ); 
    232     return is_rx?rx_level:tx_level; 
     225    unsigned level; 
     226    PJSUA2_CHECK_EXPR( pjsua_conf_get_signal_level(id, NULL, &level) ); 
     227    return level; 
    233228} 
    234229 
Note: See TracChangeset for help on using the changeset viewer.