Exemplo n.º 1
0
 private void _mic_OnVolumeNotification(Implementations.AudioVolumeNotificationData data)
 {
     if (IsForced)
     {
         //Everything that happens in the callback,
         //must be done in a non-blocking way.
         //Therefore, we need to invoke a new thread via the dispatcher,
         //because we cannot simply get information from the interface while
         //we are handling the callback.
         Application.Current.Dispatcher.BeginInvoke((Action)(() =>
         {
             IsMuted = IsMuted;
         }));
     }
     else
     {
         IsMuted = data.Muted;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Gets called by the AudioEndpointVolumeCallback
 /// </summary>
 /// <param name="notificationData"></param>
 internal void FireNotification(AudioVolumeNotificationData notificationData)
 {
     OnVolumeNotification(notificationData);
 }