示例#1
0
        public AudioProcessor(IAudioRecorder audioRecorder, IAudioEvaluator audioEvaluator, IWatcherAudioStorage watcherAudioStorage)
        {
            _audioRecorder       = audioRecorder;
            _audioEvaluator      = audioEvaluator;
            _watcherAudioStorage = watcherAudioStorage;

            _buffer           = new CircularBuffer <byte>(BUFFER_SIZE);
            _sampleAggregator = new SampleAggregator();
            _startedWatchers  = new Dictionary <Guid, Watcher>();

            _audioRecorder.SetSampleAggregator(_sampleAggregator);

            _timer          = new Timer(1000);
            _timer.Elapsed += _timer_Elapsed;
        }
示例#2
0
 public void SetSampleAggregator(SampleAggregator sampleAggregator)
 {
     _sampleAggregator = sampleAggregator;
     RecordingFormat   = new WaveFormat(RATE, 1);
 }