// Use this for initialization void Start() { Debug.Log(testText.text); textLoader = new TextLoader(testText.text); resourceLoader.Initialize(this); sounder = new SoundProcessor(); sounder.Initialize(resourceLoader); varProcessor = new VariableProcessor(); varProcessor.Initialize(textLoader); sceneProcessor = new SceneProcessor(); sceneProcessor.Initialize(this, resourceLoader); messenger.Initialize(textLoader, varProcessor); imager.Initialize(resourceLoader); processorList = new List <CommandProcessor>(); processorList.Add(messenger); processorList.Add(imager); processorList.Add(sounder); processorList.Add(varProcessor); processorList.Add(sceneProcessor); processIndex = -1; onEnd = false; }
private string joinSoundChannels(string fileName1, string fileName2) { var joinedFileName = Settings.GetTempFileName(); return(SoundProcessor.JoinChannels(fileName1, fileName2, joinedFileName, Settings.Current.SeparateSoundChannels) ? joinedFileName : null); }
public ElementProcessor(AsBaseEntity _entity) { m_Owner = _entity; m_Effect = new EffectProcessor(_entity); m_Sound = new SoundProcessor(_entity); m_Potency = new PotencyProcessor(_entity); m_Buff = new BuffProcessor(_entity); }
public Camera(int id) { this.Id = id; ImgP = new ImageProcessor(); SoundP = new SoundProcessor(); CamDriver = new CameraDriver(); CamLight = new CameraLight(); MotSensor = new MotionSensor(); }
public void GetFirstRecoveredFrequency_GivenTestFile_Returns4() { string filename = @"Input\testa.txt"; long expected = 4; long actual = SoundProcessor.GetFirstRecoveredFrequency(filename); Assert.AreEqual(expected, actual); }
public static string Serialize(VCard vcard) { var builder = new StringBuilder(); builder.Append(CategoriesProcessor.Serialize(vcard)); builder.Append(NickNameProcessor.Serialize(vcard)); builder.Append(SortStringProcessor.Serialize(vcard)); builder.Append(SoundProcessor.Serialize(vcard)); builder.Append(KeyProcessor.Serialize(vcard)); builder.Append(ClassificationProcessor.Serialize(vcard)); return(builder.ToString()); }
public void VerifyWhereStartOK() { // Arrange short[] data = new short[1000], pattern = new short[100]; // Fill with sample data for (int i = 0; i < pattern.Length; i++) { if (i % 2 == 0) { pattern[i] = -2; } else { pattern[i] = 2; } } for (int i = 0; i < data.Length; i++) { if (i >= 900) { if (i % 2 == 0) { data[i] = -2; } else { data[i] = 2; } } else { if (i % 2 == 0) { data[i] = -1; } else { data[i] = 1; } } } // Act int expected = 900, actual = SoundProcessor.FindPattern(data, pattern); // Assert Assert.AreEqual(expected, actual); }
public void VerifyWhereStartFALSE() { // Arrange short[] data = new short[1000], pattern = new short[100]; // Fill with data for (int i = 0; i < data.Length; i++) { data[i] = (short)i; } for (int i = 0; i < pattern.Length; i++) { pattern[i] = (short)(i * i * i); } // Act int expected = -1, actual = SoundProcessor.FindPattern(data, pattern); // Assert Assert.AreEqual(expected, actual); }
private void LayoutRoot_Loaded(object sender, RoutedEventArgs e) { Settings = SettingsHelper.Load(); if (Settings.MusicNotationMode == MusicNotationMode.Create) { rbRecognition.IsChecked = true; } else { rbFolow.IsChecked = true; } //Settings = new Settings(); Processor = new SoundProcessor(NoteViewer.UpdateMusicalSymbol, Settings); NoteUpdater = new DispatcherTimer(); NoteUpdater.Tick += NoteUpdater_Tick; NoteUpdater.Interval = new TimeSpan(0, 0, 0, 0, 20); Recorder = new AudioRecorder(80); Recorder.Samples += OnSamples; Recorder.Samples += Processor.OnSamples; }
private bool encodeMp3(string joinedFileName, string recordFileName) { return(SoundProcessor.EncodeMp3(joinedFileName, recordFileName, Settings.Current.VolumeScale, Settings.Current.HighQualitySound, Settings.Current.SoundSampleFrequency, Settings.Current.SoundBitrate)); }
public IndoorCamFacade() { ImgP = new ImageProcessor(); SoundP = new SoundProcessor(); CamDriver = new CameraDriver(); }
public static void Main(string[] args) { var gamePath = args.Length >= 1 ? Path.GetFullPath(args[0]) : DefaultGamePath; if (!Directory.Exists(gamePath)) { Logger.Error("Invalid game path \"{0}\" (Missing directory)", gamePath); Environment.Exit(1); return; } var extractedGamePath = Path.GetFullPath(ExtractedGameDirectory); if (!Directory.Exists(extractedGamePath)) { Logger.Debug("Using game path: \"{0}\"", gamePath); var pakPath = Path.Combine(gamePath, AudioPakPath); if (!File.Exists(pakPath)) { Logger.Error("Missing audio pak file in \"{0}\" ({1})", pakPath, UnsupportedVersionMessage); Environment.Exit(1); return; } Logger.Debug("Sounds PAK file found: \"{0}\"", pakPath); // EXTRACTING GAME FILES var extractor = new GameExtractor(pakPath); if (!extractor.Extract(extractedGamePath)) { Logger.Error("Unable to extract the game files"); Environment.Exit(1); return; } } else { Logger.Debug("Using extracted game path: \"{0}\"", extractedGamePath); } // PARSING SOUND BANKS FILE var soundsPath = Path.Combine(extractedGamePath, SoundDirectory); if (!Directory.Exists(soundsPath)) { Logger.Error("Missing sounds folder at \"{0}\" ({1})", soundsPath, UnsupportedVersionMessage); Environment.Exit(1); return; } var soundParser = new SoundParser(soundsPath); var streamedSounds = soundParser.ParseStreamedSounds(); if (streamedSounds == null) { Logger.Error("Unable to parse the streamed sounds"); Environment.Exit(1); return; } var soundBanks = soundParser.ParseBanks(); if (soundBanks == null) { Logger.Error("Unable to parse the sound banks"); Environment.Exit(1); return; } // EXTRACTING SOUND FILES var tmpDirectory = Path.GetFullPath(TempDirectory); var outputDirectory = Path.GetFullPath(OutputDirectory); Directory.CreateDirectory(tmpDirectory); Directory.CreateDirectory(outputDirectory); var soundExtractor = new SoundExtractor(soundsPath, streamedSounds, soundBanks); soundExtractor.ExtractStreamedFiles(outputDirectory); soundExtractor.ExtractSoundBanks(tmpDirectory, outputDirectory); soundExtractor.ExtractLeftOverSounds(outputDirectory); var soundProcessor = new SoundProcessor(outputDirectory); soundProcessor.ProcessSounds(); Logger.Info("Done."); Console.ReadKey(); }
public IndoorController() { CamDriver = new CameraDriver(); ImgP = new ImageProcessor(); SoundP = new SoundProcessor(); }
public SoundProcessorViewModel() { processor = new SoundProcessor(); }