private void StartListenning(SoundCaptureDevice device) { isListenning = true; frequencyInfoSource = new SoundFrequencyInfoSource(device); frequencyInfoSource.FrequencyDetected += new EventHandler <FrequencyDetectedEventArgs>(frequencyInfoSource_FrequencyDetected); frequencyInfoSource.Listen(); }
private void StopListenning() { isListenning = false; frequencyInfoSource.Stop(); frequencyInfoSource.FrequencyDetected -= new EventHandler <FrequencyDetectedEventArgs>(frequencyInfoSource_FrequencyDetected); frequencyInfoSource = null; }