Esempio n. 1
0
 public WaveData(EndianBinaryReader er, out bool OK)
 {
     this.Type = er.ReadString(Encoding.ASCII, 4);
     if (this.Type != "WAVE")
     {
         OK = false;
     }
     else
     {
         bool OK1;
         this.FMT = new WAV.WaveData.FMTBlock(er, out OK1);
         if (!OK1)
         {
             OK = false;
         }
         else
         {
             this.DATA = new WAV.WaveData.DATABlock(er, out OK1);
             if (!OK1)
             {
                 OK = false;
             }
             else
             {
                 OK = true;
             }
         }
     }
 }
Esempio n. 2
0
 public WaveData(byte[] Data, uint SampleRate, ushort BitsPerSample, ushort NrChannel)
 {
     this.Type = "WAVE";
     this.FMT  = new WAV.WaveData.FMTBlock(SampleRate, BitsPerSample, NrChannel);
     this.DATA = new WAV.WaveData.DATABlock(Data);
 }