protected void InitAudioWatcher() { if (audioWatcher != null) { return; } string directory = ConfigManager.GetInstance().Find("os.recognize", ""); if (!Directory.Exists(directory)) { return; } Log("Init Audio Watcher: " + directory); audioWatcher = new AdvancedFileSystemWatcher(); audioWatcher.Path = directory; audioWatcher.Filter = "*.wav"; audioWatcher.IncludeSubdirectories = true; audioWatcher.NotifyFilter = NotifyFilters.LastWrite; audioWatcher.Changed += new EventHandler <SoftMade.IO.FileSystemEventArgs>(audio_Changed); audioWatcher.EnableRaisingEvents = true; buffer = new StreamBuffer(); var confidence = ConfigManager.GetInstance().Find("os.confidence", 0.6); var format = ConfigManager.GetInstance().Find("os.format", "Kinect"); AddOnManager.GetInstance().AddAudioSource("FileSystem", buffer, format, null, confidence); }
public void Watch(string path) { if (!Directory.Exists(path)) { return; } Log("Watching: " + path); this.path = path; watcher = new AdvancedFileSystemWatcher(); watcher.Path = path; watcher.Filter = "*.xml"; watcher.IncludeSubdirectories = true; watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size; watcher.Changed += new EventHandler<SoftMade.IO.FileSystemEventArgs>(watcher_Changed); watcher.EnableRaisingEvents = true; }
public void Watch(string path) { if (!Directory.Exists(path)) { return; } Log("Watching: " + path); this.path = path; watcher = new AdvancedFileSystemWatcher(); watcher.Path = path; watcher.Filter = "*.xml"; watcher.IncludeSubdirectories = true; watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size; watcher.Changed += new EventHandler <SoftMade.IO.FileSystemEventArgs>(watcher_Changed); watcher.EnableRaisingEvents = true; }
protected void InitAudioWatcher() { if (audioWatcher != null) { return; } string directory = ConfigManager.GetInstance().Find("os.recognize", ""); if (!Directory.Exists(directory)) { return; } Log("Init Audio Watcher: " + directory); audioWatcher = new AdvancedFileSystemWatcher(); audioWatcher.Path = directory; audioWatcher.Filter = "*.wav"; audioWatcher.IncludeSubdirectories = true; audioWatcher.NotifyFilter = NotifyFilters.LastWrite; audioWatcher.Changed += new EventHandler<SoftMade.IO.FileSystemEventArgs>(audio_Changed); audioWatcher.EnableRaisingEvents = true; buffer = new StreamBuffer(); var confidence = ConfigManager.GetInstance().Find("os.confidence", 0.6); var format = ConfigManager.GetInstance().Find("os.format", "Kinect"); AddOnManager.GetInstance().AddAudioSource("FileSystem", buffer, format, null, confidence); }