Changeset 4771 for pjproject/trunk/pjsip/src/pjsua2/media.cpp
- Timestamp:
- Feb 27, 2014 10:53:15 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua2/media.cpp
r4708 r4771 206 206 void AudioMedia::adjustRxLevel(float level) throw(Error) 207 207 { 208 PJSUA2_CHECK_EXPR( pjsua_conf_adjust_tx_level(id, level) ); 209 } 210 211 void AudioMedia::adjustTxLevel(float level) throw(Error) 212 { 208 213 PJSUA2_CHECK_EXPR( pjsua_conf_adjust_rx_level(id, level) ); 209 214 } 210 215 211 void AudioMedia::adjustTxLevel(float level) throw(Error)212 {213 PJSUA2_CHECK_EXPR( pjsua_conf_adjust_tx_level(id, level) );214 }215 216 216 unsigned AudioMedia::getRxLevel() const throw(Error) 217 217 { 218 return getSignalLevel(true); 218 unsigned level; 219 PJSUA2_CHECK_EXPR( pjsua_conf_get_signal_level(id, &level, NULL) ); 220 return level; 219 221 } 220 222 221 223 unsigned AudioMedia::getTxLevel() const throw(Error) 222 224 { 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; 233 228 } 234 229
Note: See TracChangeset
for help on using the changeset viewer.