[pjsip] quick question about volume and PJSUA-LIB
C R McClenaghan
chris at mcclenaghan.com
Tue Mar 10 14:40:12 EDT 2009
Benny,
Based on the sample application, I was experimenting with separate
volume control over the "bridge" versus over any attached "leg". I
have modified the sample application so I can set volume on any
attached port as well as port 0. In doing this I've found that I
cannot manage the volume in the expected fashion. Applying 2.0 should
double, applying 0.5 should halve. However, it appears that these or
more absolute than relative. Repeated application of 0.5 does not
reduce the volume on the second and subsequent applications - the
volume remains the same. I had expected to eventually get an effective
mute.
The discussion with Jim lead to an absolute range of 0 to 255 and
controls that reflected that. The remainder of the discussion had to
do with min/max as macros and linker problems I had using them on the
Mac.
So, questions: Is the intent of pjmedia_conf_adjust_tx_level and
pjmedia_conf_adjust_rx_level to provide relative volume control or
absolute? Is this possibly dependent on the underlying hardware?
Chris
On Mar 10, 2009, at 10:23 AM, Benny Prijono wrote:
> Not sure if I'm following this thread correctly, but yes there's no
> upper limit in the level value. If you give it 0.5, the volume will
> be halved, if you give it 2.0, it will be twice as loud, and so on.
>
> cheers
> Benny
>
> On Tue, Mar 10, 2009 at 4:04 PM, C R McClenaghan <chris at mcclenaghan.com
> > wrote:
> All,
>
> Careful readers will have noted the logic error in the statement
> below. It should read:
>
> int newlevel = (0 < ((int) level < 255 ? (int) level : 255) ? (int)
> level : 0);
> ^
> ^
>
> Chris
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090310/9f01f326/attachment.html>
More information about the pjsip
mailing list