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?
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:
HTH
Cornelis
-----Original Message-----
From: Reklama reklama@forrest79.net
To: pjsip@lists.pjsip.org
Sent: Sat, Apr 9, 2011 5:32 pm
Subject: [pjsip] 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@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
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@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:
HTH
Cornelis
-----Original Message-----
From: Reklama reklama@forrest79.net
To: pjsip@lists.pjsip.org
Sent: Sat, Apr 9, 2011 5:32 pm
Subject: [pjsip] 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@lists.pjsip.org mailto:pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org