예제 #1
0
 public void Reset()
 {
     ansamDetector = null;
     toneDetector  = null;
     toneGenerator = null;
     receivedMenu  = null;
     currentDatum  = 0;
     currentBit    = 0;
     recvData      = new List <byte>();
 }
예제 #2
0
        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);
        }