public void ResetDevices() { // kill thread if (AudioThread != null) { ThreadRunning = false; AudioEvent.Set(); AudioThread.Join(2000); AudioThread = null; } // deconstruct all record/play streams if (Recorder != null) { Recorder.Dispose(); Recorder = null; } Players.ForEach(p => p.Dispose()); Players.SafeClear(); // will auto be recreated }