void Refresh() { AvailableAudioSources.Clear(); foreach (var dev in WasapiLoopbackDevice.Devices) { if (dev.DeviceInfo.IsEnabled) { AvailableAudioSources.Add(dev); } } }
protected override void OnRefresh() { AvailableAudioSources.Clear(); WasapiDeviceInfo devInfo; for (var i = 0; BassWasapi.GetDeviceInfo(i, out devInfo); ++i) { AvailableAudioSources.Add(devInfo); } SelectedAudioDevice = AvailableAudioSources[0]; }
void Refresh() { AvailableAudioSources.Clear(); foreach (var dev in RecordingDevice.Enumerate()) { AvailableAudioSources.Add(dev); } if (AvailableAudioSources.Count > 0) { SelectedAudioDevice = AvailableAudioSources[0]; } }
public void RefreshAudioSources() { AvailableAudioSources.Clear(); AvailableAudioSources.Add(NoSoundSource); foreach (var dev in WaveInDevice.Enumerate()) { AvailableAudioSources.Add(dev); } foreach (var dev in LoopbackProvider.EnumerateDevices()) { AvailableAudioSources.Add(dev); } SelectedAudioSource = NoSoundSource; }
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; } }