summaryrefslogtreecommitdiff
path: root/pjsip/src
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-12-26 02:27:14 +0000
committerBenny Prijono <bennylp@teluu.com>2006-12-26 02:27:14 +0000
commit66ba60640c9016496736679a5f5d4f76ca9c92b4 (patch)
treea71e50cfd9d35fad717f020cc586c2fed0dd540f /pjsip/src
parent2fe9c7e503a9599ed0361e10bb6ba1c4bf311e4c (diff)
Ticket #51: Added audio level adjustment to PJSUA-API
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@864 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_media.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c
index 87d7d6df..07af5fbb 100644
--- a/pjsip/src/pjsua-lib/pjsua_media.c
+++ b/pjsip/src/pjsua-lib/pjsua_media.c
@@ -673,6 +673,40 @@ PJ_DEF(pj_status_t) pjsua_conf_disconnect( pjsua_conf_port_id source,
}
+/*
+ * Adjust the signal level to be transmitted from the bridge to the
+ * specified port by making it louder or quieter.
+ */
+PJ_DEF(pj_status_t) pjsua_conf_adjust_tx_level(pjsua_conf_port_id slot,
+ float level)
+{
+ return pjmedia_conf_adjust_tx_level(pjsua_var.mconf, slot,
+ (int)((level-1) * 128));
+}
+
+/*
+ * Adjust the signal level to be received from the specified port (to
+ * the bridge) by making it louder or quieter.
+ */
+PJ_DEF(pj_status_t) pjsua_conf_adjust_rx_level(pjsua_conf_port_id slot,
+ float level)
+{
+ return pjmedia_conf_adjust_rx_level(pjsua_var.mconf, slot,
+ (int)((level-1) * 128));
+}
+
+
+/*
+ * Get last signal level transmitted to or received from the specified port.
+ */
+PJ_DEF(pj_status_t) pjsua_conf_get_signal_level(pjsua_conf_port_id slot,
+ unsigned *tx_level,
+ unsigned *rx_level)
+{
+ return pjmedia_conf_get_signal_level(pjsua_var.mconf, slot,
+ tx_level, rx_level);
+}
+
/*****************************************************************************
* File player.
*/
@@ -1008,7 +1042,7 @@ PJ_DEF(pj_status_t) pjsua_set_snd_dev( int capture_dev,
int playback_dev)
{
pjmedia_port *conf_port;
- const pjmedia_snd_dev_info *cap_info, *play_info;
+ const pjmedia_snd_dev_info *play_info;
unsigned clock_rates[] = { 0, 22050, 44100, 48000, 11025, 32000, 8000};
unsigned selected_clock_rate = 0;
unsigned i;