public void WaveFileAudioSourceConstructorTest()
        {
            string fileName = Path.Combine(TestContext.CurrentContext.TestDirectory, "Resources", "a.wav");

            WaveFileAudioSource target = new WaveFileAudioSource(fileName);

            Signal s = null;

            target.NewFrame += delegate(object sender, NewFrameEventArgs e)
            {
                if (s == null)
                {
                    s = e.Signal;
                }

                Assert.AreEqual(s.SampleRate, 44100);
                Assert.AreEqual(s.Channels, 2);
                Assert.AreEqual(s.Length, 8192);
                Assert.AreEqual(s.Channels * s.Length, s.Samples);
            };


            target.Start();

            target.WaitForStop();

            Assert.AreEqual(180224, target.FramesReceived);
            Assert.AreEqual(705600, target.BytesReceived);
        }
        public void WaveFileAudioSourceConstructorTest()
        {
            string fileName = @"..\..\..\..\Unit Tests\Accord.Tests.Audio\Resources\Grand Piano - Fazioli - major A middle.wav";

            WaveFileAudioSource target = new WaveFileAudioSource(fileName);

            Signal s = null;

            target.NewFrame += delegate(object sender, NewFrameEventArgs e)
            {
                if (s == null)
                {
                    s = e.Signal;
                }

                Assert.AreEqual(s.SampleRate, 44100);
                Assert.AreEqual(s.Channels, 2);
                Assert.AreEqual(s.Length, 8192);
                Assert.AreEqual(s.Channels * s.Length, s.Samples);
            };


            target.Start();

            target.WaitForStop();

            Assert.AreEqual(180224, target.FramesReceived);
            Assert.AreEqual(705600, target.BytesReceived);
        }