public void Reset() { ansamDetector = null; toneDetector = null; toneGenerator = null; receivedMenu = null; currentDatum = 0; currentBit = 0; recvData = new List <byte>(); }
public IWaveProvider Answer(IWaveIn waveIn) { Reset(); var sampleRate = waveIn.WaveFormat.SampleRate; state = CallState.WaitForCallMenu; toneDetector = new BiFSKDetector(sampleRate, Channel1Freq); toneDetector.DetectTone += ToneDetected; toneGenerator = new ToneGenerator(sampleRate, Channel2Freq); toneGenerator.SendANSam(); waveIn.DataAvailable += WaveInDataAvailable; return(toneGenerator); }