Exemple #1
0
 public void SetSpeaker()
 {
     foreach (AudioDevice device in program.audioDeviceList)
     {
         if (device.State.ToString().Equals("Active"))
         {
             if (device.Description.Equals(this.name))
             {
                 AudioSwitcher.Audio.AudioDeviceManager adm = new AudioSwitcher.Audio.AudioDeviceManager();
                 adm.SetDefaultAudioDevice(device.Id);
             }
         }
     }
 }
Exemple #2
0
 public static void SetDefaultAudioDevic(string id)
 {
     AudioSwitcher.Audio.AudioDeviceManager adm = new AudioSwitcher.Audio.AudioDeviceManager();
     adm.SetDefaultAudioDevice(id);
 }