private void Play_Click(object sender, EventArgs e) { var reader = new NAudio.Wave.Mp3FileReader("C:\\Users\\Andris\\Desktop\\Cornfield chase.mp3"); int index = 100; for (int idx = 0; idx < NAudio.Wave.WaveOut.DeviceCount; ++idx) { string devName = NAudio.Wave.WaveOut.GetCapabilities(idx).ProductName; if(Mics.SelectedItem != null) Sounds.Items.Add(devName); { if (devName.StartsWith(Mics.SelectedItem.ToString())) { Sounds.Items.Add("ok!"); index = idx; break; } } } NAudio.Wave.WaveOut waveOut = new NAudio.Wave.WaveOut(){DeviceNumber = index}; waveOut.Init(reader); waveOut.Play(); }