/// <summary>
 /// Automute the system volume.
 /// Mute when one device is playng, Unmute when no one is playing.
 /// </summary>
 public void AutoMute(bool playing)
 {
     if (mainForm.GetAutoMute())
     {
         if (playing)
         {
             SystemVolume.Mute(true, mainForm);
             isMuted = true;
         }
         else if (!playing && !IsAnyDevicePlaying() && isMuted)
         {
             SystemVolume.Mute(false, mainForm);
             isMuted = false;
         }
     }
 }