Ejemplo n.º 1
0
 public void Dispose()
 {
     wfr.Dispose();
     myDSP.Dispose();
     myDSP    = null;
     wfr      = null;
     leftBuf  = null;
     rightBuf = null;
 }
Ejemplo n.º 2
0
 public WavData(string path)
 {
     this.path             = path;
     this.samplesPerSecond = 44100;
     bufSize = WavPlayer.BufSize / 2;
     if (path.EndsWith("wav"))
     {
         wfr = new WaveReader(path);
     }
     else if (path.EndsWith("mp3"))
     {
         wfr = new MP3Reader(path);
     }
     if (path.EndsWith("sine200.wav"))
     {
         wfr = new WaveGenerator(200, WaveType.Square);
     }
     ChangeBufSize(bufSize);
     this.myDSP  = new DSPSelector();
     this.length = (int)wfr.Length / 4;
     OverlapSize = (int)(bufSize / FHTransform.kOverlapCount);
     FetchBuffer(0);
 }