public void ReadMonoFromFileTest()
 {
     #pragma warning disable 612,618
     using (DirectSoundAudioService directSoundAudioService = new DirectSoundAudioService())
     #pragma warning restore 612,618
     {
         float[] samples = directSoundAudioService.ReadMonoFromFile(PathToWav, SampleRate);
         FileInfo info = new FileInfo(PathToWav);
         long expectedSize = info.Length - WaveHeader;
         long actualSize = samples.Length * (BitsPerSample / 8);
         Assert.AreEqual(expectedSize, actualSize);
     }
 }
        public void ReadMonoFromFileUsingBothProxiesTest()
        {
            string name = MethodBase.GetCurrentMethod().Name;
            using (BassAudioService bassAudioService = new BassAudioService())
            {
                using (DirectSoundAudioService directSoundAudioService = new DirectSoundAudioService())
                {
                    float[] bdata = bassAudioService.ReadMonoFromFile(PathToMp3, 5512);
                    float[] ddata = directSoundAudioService.ReadMonoFromFile(PathToWav, 5512);

                    for (int i = 0; i < bdata.Length; i++)
                    {
                        if ((Math.Abs(bdata[i] - ddata[i]) / int.MaxValue) > 1)
                        {
                            Assert.Fail("Data arrays are different: " + bdata[i] + ":" + ddata[i] + " at " + i);
                        }
                    }

                    Assert.AreEqual(bdata.Length, ddata.Length);
                }
            }
        }