Esempio n. 1
0
 public void TestRead()
 {
     AudioReader reader = new AudioReader();
       SoundData data = reader.ReadSoundFile("../../../data/sine.wav");
       Assert.AreEqual(1, data.Duration,
               "The duration of the data is one second");
 }
Esempio n. 2
0
 public void TestPipeline()
 {
     AudioReader reader = new AudioReader();
       SoundData audio = reader.ReadSoundFile("../../../data/file-system.wav");
       AmplitudeAnalyzer ampAnalyzer = new AmplitudeAnalyzer();
       ampAnalyzer.SetVerbosity(true);
       SoundData[] chunks = ampAnalyzer.SplitChunks(audio);
       Assert.AreEqual(2, chunks.Length, "Two chunks are in the file.");
 }
Esempio n. 3
0
        public void TestActualData()
        {
            AudioReader reader = new AudioReader();
              SoundData audio = reader.ReadSoundFile("../../../data/sample.wav");
              BinaryData bin = analyzer.ConvertToSquare(audio);
              IEnumerator<bool> ie = bin.GetEnumerator();

              while (ie.MoveNext()) {
            Assert.IsTrue(ie.Current, "Data values.");
              }
        }
Esempio n. 4
0
        public void TestData()
        {
            AudioReader reader = new AudioReader();
              SoundData data = reader.ReadSoundFile("../../../data/sine.wav");

              int length = 0;
              IEnumerator<Int16> ie = data.GetEnumerator();
              while (ie.MoveNext()) {
            length++;
              }

              Assert.AreEqual(data.Length, length, "Data length");
        }