public static void RefreshAudioSources() { AvailableAudioSources.Clear(); AvailableAudioSources.Add(new KeyValuePair <string, string>("-1", "[No Sound]")); foreach (var Dev in WaveInDevice.Enumerate()) { AvailableAudioSources.Add(new KeyValuePair <string, string>(Dev.DeviceNumber.ToString(), Dev.Name)); } foreach (var Dev in WasapiLoopbackCapture.EnumerateDevices()) { AvailableAudioSources.Add(new KeyValuePair <string, string>(Dev.ID, Dev.Name + " (Loopback)")); } if (Instance != null) { Instance.AudioSourcesBox.SelectedIndex = 0; } }