How can I set transmit-side volume scale on iOS?

525 views
Skip to first unread message

Ray Wang

unread,
Aug 11, 2016, 2:12:20 AM8/11/16
to discuss-webrtc
Hi,

Since AGC is disabled by default on iOS,  and Microphone & Speaker volume cannot be set on iOS.

There is one way to set output volume scale with VoEVolumeControlImpl::SetChannelOutputVolumeScaling, 

However I couldn't find any way to set transmit side volume scale, please tell me how to do this if anyone knows. Thanks.

Lars Bork

unread,
Nov 23, 2016, 5:40:20 PM11/23/16
to discuss-webrtc
Hey Ray,

have you been able to find a way to set the volume for a specific audio track / channel?
I've also seen low-level C++ api which provides things like "SetChannelOutputVolumeScaling", but I am not sure how this could work together with the high-level Objective-C architecture.
I'd really appreciate any suggestions or hints!

Thanks a lot and have a nice day!

Wangrui

unread,
Nov 25, 2016, 5:37:56 AM11/25/16
to discuss...@googlegroups.com
NO, I didn't find a way to do that. I guess you have to modify the low level C++ code if you really need that.

Sent from my iPhone
--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/bdw8q2YemlA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/1dacb457-ee1d-4dd0-9e22-9874523bf194%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alvaro Gil

unread,
Nov 25, 2016, 7:25:21 AM11/25/16
to discuss-webrtc
Ray, did you try something like this ?

AVAudioSession *audioSession = AVAudioSession.sharedInstance;

if (audioSession.isInputGainSettable) {
    [audioSession setInputGain:0.5 error:&gainError];
} else {
    NSLog(@"Device is not input gain settable!");
}

if (gainError) {
    NSLog(@"Error: %@", gainError);
}

BTW I am looking for access to AudioUnit being used by WebRTC, if anyone has a tip for it please share.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/0cdd982e-2454-499e-bc40-35fcf33ce8d4%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Henrik Andreasson

unread,
Nov 25, 2016, 7:35:07 AM11/25/16
to discuss-webrtc
Just FYI, AGC is not disabled on iOS (as was stated earlier in this thread).
The software based AGC version in WebRTC is disabled but instead the native AGC provided by the audio unit in iOS is utilized.
We also use a separate level controller (LC) on top of the built-in AGC. I am unable to see any use of additional gain APIs on the
shared audio session. The LC + AGC should be sufficient.

Fredrik Solenberg

unread,
Dec 1, 2016, 5:09:39 AM12/1/16
to discuss-webrtc
See this thread for more discussion on setting levels on incoming/outgoing streams: https://groups.google.com/d/msg/discuss-webrtc/6W5wJ76AugI/hqLVTqhsCwAJ

On Friday, November 25, 2016 at 1:35:07 PM UTC+1, Henrik Andreassson wrote:
Just FYI, AGC is not disabled on iOS (as was stated earlier in this thread).
The software based AGC version in WebRTC is disabled but instead the native AGC provided by the audio unit in iOS is utilized.
We also use a separate level controller (LC) on top of the built-in AGC. I am unable to see any use of additional gain APIs on the
shared audio session. The LC + AGC should be sufficient.
On Fri, Nov 25, 2016 at 1:24 PM, Alvaro Gil <zeva...@gmail.com> wrote:
Ray, did you try something like this ?

AVAudioSession *audioSession = AVAudioSession.sharedInstance;

if (audioSession.isInputGainSettable) {
    [audioSession setInputGain:0.5 error:&gainError];
} else {
    NSLog(@"Device is not input gain settable!");
}

if (gainError) {
    NSLog(@"Error: %@", gainError);
}

BTW I am looking for access to AudioUnit being used by WebRTC, if anyone has a tip for it please share.
2016-08-11 3:12 GMT-03:00 Ray Wang <wangr...@gmail.com>:
Hi,

Since AGC is disabled by default on iOS,  and Microphone & Speaker volume cannot be set on iOS.

There is one way to set output volume scale with VoEVolumeControlImpl::SetChannelOutputVolumeScaling, 

However I couldn't find any way to set transmit side volume scale, please tell me how to do this if anyone knows. Thanks.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.



--
Alvaro

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages