Change microphone volume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for reply, but I forgot say, that I want use only pjmedia and not pjsua. I know, there is function pjmedia_conf_adjust_rx_level and pjmedia_conf_adjust_tx_level, but I didn't use conference in my program. Thats the reason, that I want use pjmedia_aud_stream_set_cap function.

Dne 9.4.2011 17:40, cg_vanderbent at mail.com napsal(a):
> I use:
>
> pjsua_conf_adjust_tx_level(0, volume);
>
> and
>
> pjsua_conf_adjust_rx_level(0, volume);
>
> to set speaker and microphone volume respectively, and works fine (0.0 <= volume <= 2.0).
>
> Notes:
> * I mute simply by setting mic volume to zero.
> * A volume of 1.0 is full volume, but I go to 2.0 to have a slightly wider range.
>
> HTH
>
> Cornelis
>
> -----Original Message-----
> From: Reklama <reklama@xxxxxxxxxxxxx>
> To: pjsip at lists.pjsip.org
> Sent: Sat, Apr 9, 2011 5:32 pm
> Subject: Change microphone volume
>
> Hello,
>
> I have the following problem. When I change the speaker volume using the following code, everything works:
>
> stream = pjmedia_snd_port_get_snd_stream(sndPort);
> status = pjmedia_aud_stream_set_cap(stream, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, &volumeSpeaker);
>
> But if I use PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING instead of the PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING for microphone volume control, function pjmedia_aud_stream_set_cap returns error PJMEDIA_EAUD_INVCAP (420008 - The audio capability is invalid or not supported). Is there some way to control the volume of the microphone or the microphone dis/connect from the port?
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>
> _______________________________________________
> 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



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux