Poles
Poles

Reputation: 3682

control built in microphone volume in ios

I am implementing a VOIP application where I want to mute the microphone for some time. For your information, I don't want to stop processing outgoing audio.How can I achieve this?

Upvotes: 0

Views: 1606

Answers (1)

rafaperez
rafaperez

Reputation: 1038

NSError *error;
[[AVAudioSession sharedInstance] setInputGain:0.0f error:&error];
  • (BOOL)setInputGain:(float)gain error:(NSError * _Nullable *)outError Changes the input gain to the specified value.

https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/#//apple_ref/occ/instm/AVAudioSession/setInputGain:error:

Upvotes: 1

Related Questions