Set device Volume with Pjmedia

L
Lele
Fri, Jul 28, 2017 1:42 PM

Hi guys, I tied to configure volume of sound device with the following
source code (with pjmedia api), but isn't working. How can I implement this
feature? Thanks in advice

pjmedia_aud_stream *pjmediaAudStream;
pjmediaAudStream = pjmedia_snd_port_get_snd_stream(snd_port);

// Volume setting is an unsigned integer showing the level in percent.
unsigned volToConfigure = 100;
status = pjmedia_aud_stream_set_cap(pjmediaAudStream,
PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, &volToConfigure);

if (status != PJ_SUCCESS) { return status; }

pjmedia_aud_stream_set_cap return PJ_SUCCESS but the volume isn't
configured. Thanks in advice.

Best Regards

LL

Hi guys, I tied to configure volume of sound device with the following source code (with pjmedia api), but isn't working. How can I implement this feature? Thanks in advice pjmedia_aud_stream *pjmediaAudStream; pjmediaAudStream = pjmedia_snd_port_get_snd_stream(snd_port); // Volume setting is an unsigned integer showing the level in percent. unsigned volToConfigure = 100; status = pjmedia_aud_stream_set_cap(pjmediaAudStream, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, &volToConfigure); if (status != PJ_SUCCESS) { return status; } pjmedia_aud_stream_set_cap return PJ_SUCCESS but the volume isn't configured. Thanks in advice. Best Regards LL
L
Lele
Mon, Jul 31, 2017 10:14 AM

On windows the same source code works, on linux with alsa driver isn't
working.

Best Regards

LL

Da: Lele [mailto:86eldnl@gmail.com]
Inviato: Friday, July 28, 2017 15:42
A: 'pjsip list' pjsip@lists.pjsip.org
Oggetto: Set device Volume with Pjmedia

Hi guys, I tied to configure volume of sound device with the following
source code (with pjmedia api), but isn't working. How can I implement this
feature? Thanks in advice

pjmedia_aud_stream *pjmediaAudStream;
pjmediaAudStream = pjmedia_snd_port_get_snd_stream(snd_port);

// Volume setting is an unsigned integer showing the level in percent.
unsigned volToConfigure = 100;
status = pjmedia_aud_stream_set_cap(pjmediaAudStream,
PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, &volToConfigure);

if (status != PJ_SUCCESS) { return status; }

pjmedia_aud_stream_set_cap return PJ_SUCCESS but the volume isn't
configured. Thanks in advice.

Best Regards

LL

On windows the same source code works, on linux with alsa driver isn't working. Best Regards LL Da: Lele [mailto:86eldnl@gmail.com] Inviato: Friday, July 28, 2017 15:42 A: 'pjsip list' <pjsip@lists.pjsip.org> Oggetto: Set device Volume with Pjmedia Hi guys, I tied to configure volume of sound device with the following source code (with pjmedia api), but isn't working. How can I implement this feature? Thanks in advice pjmedia_aud_stream *pjmediaAudStream; pjmediaAudStream = pjmedia_snd_port_get_snd_stream(snd_port); // Volume setting is an unsigned integer showing the level in percent. unsigned volToConfigure = 100; status = pjmedia_aud_stream_set_cap(pjmediaAudStream, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, &volToConfigure); if (status != PJ_SUCCESS) { return status; } pjmedia_aud_stream_set_cap return PJ_SUCCESS but the volume isn't configured. Thanks in advice. Best Regards LL