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; }
public void SetSampleAggregator(SampleAggregator sampleAggregator) { _sampleAggregator = sampleAggregator; RecordingFormat = new WaveFormat(RATE, 1); }