Mute mic input and speaker output in code

116 views
Skip to first unread message

Kamil Donoval

unread,
Aug 26, 2014, 9:30:28 AM8/26/14
to webrtc...@googlegroups.com
Hi everyone I'm trying programmatically mute mic and  speaker  by VoEVolumeControl but this is no supported in iOS, it's there any way to do this in webrtc-jingle  ??? 
I'm trying  to send data over bluetooth handsfree  this require to mute the mic and speaker  or stop streaming data from this device and  replace  stream payload  with bluetooth handsfree payload.I don't know where to place this implementation, any idea or experience with this would help me.

Best regards

My code  for get  VoEVolumeControl interface is below

   webrtc::VoiceEngine* voe = webrtc::VoiceEngine::Create();

 

   
if (voe == NULL) {

       
NSLog(@"Failed to initialize voice engine.\n");

   
}

 
    webrtc
::VoEVolumeControl* volume_control =webrtc::VoEVolumeControl::GetInterface(voe);

   
if (volume_control->SetMicVolume(0) != 0) {

       
NSLog(@"Failed set volume to 0.\n");

   
}


       volume_control
->SetSystemInputMute(YES);

   
if ( volume_control->SetSystemInputMute(YES) != YES) {

       
NSLog(@"Failed set  InputMute.\n");

   
}


 




Reply all
Reply to author
Forward
0 new messages