private void PlaySilence() { if (cmbRecordingDevice.SelectedItem != null) { wavGenerator.Stop(); wavGenerator.PlaySilenceLoop(((MMDevice)cmbRecordingDevice.SelectedItem).FriendlyName); } }
private void PlaySilence() { if (cmbRecordingDevice.SelectedItem != null) { wavGenerator.Stop(); var device = (MMDevice)cmbRecordingDevice.SelectedItem; wavGenerator.PlaySilenceLoop(device.FriendlyName, device.DeviceFormat); } }