Change microphone volume

R
Reklama
Sat, Apr 9, 2011 3:32 PM

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?

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?
CV
cg_vanderbent (at) mail.com
Sat, Apr 9, 2011 3:40 PM

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@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

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@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
R
Reklama
Sun, Apr 10, 2011 6:01 PM

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:

  • 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@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

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: > * 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@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