2

I have a situation where I need to detect the audio devices connected to the system using the lync 2013 sdk api and then need to control its volume and other stuff like muting and unmuting it.

1 Answers1

0

I haven't had a chance to test it as most of my Lync contacts are offline at the moment but have you tried affecting the properties of the AV modality rather than of the audio devices themselves?

Something like this:-

  void ConversationManager_ConversationAdded(object sender, Microsoft.Lync.Model.Conversation.ConversationManagerEventArgs e)
    {
        var audioProperty = e.Conversation.Modalities[Microsoft.Lync.Model.Conversation.ModalityTypes.AudioVideo].Properties;
        audioProperty[Microsoft.Lync.Model.Conversation.ModalityProperty.AVModalityAudioCaptureMute] = true;
    }

I've a sneaky feeling that these values may be readonly, but worth a try.

Along a similar vein, you may be able to affect mute at least via the conversation directly using the following although I fear it maybe limit to use within conferences:-

 e.Conversation.SelfParticipant.BeginSetMute(true, EndSetMute, null);

Sorry I can't test these tonight, let me know how you get on.

Paul Hodgson
  • 939
  • 8
  • 15