/// ------------------------------------------------------------------------------------ public bool GetIsInErrorState(bool displayErrorMsg) { lock (this) { try { // The goal here is just to reference something in the recorder that // will throw an exception when something has gone wrong (e.g. the // user unplugged or disabled their microphone). if (_waveIn.GetMixerLine().Channels > 0) { return(false); } } catch { } if (displayErrorMsg) { AudioUtils.DisplayNAudioError(null); } _formerlyInErrorState = true; } return(true); }