Ejemplo n.º 1
0
 public WaveData(EndianBinaryReader er)
 {
     Signature = er.ReadString(ASCIIEncoding.ASCII, 4);
     if (Signature != "WAVE")
     {
         throw new SignatureNotCorrectException(Signature, "WAVE", er.BaseStream.Position - 4);
     }
     FMT  = new FMTBlock(er);
     DATA = new DATABlock(er);
 }
Ejemplo n.º 2
0
            public WaveData(EndianBinaryReader er)
            {
                Signature = er.ReadString(ASCIIEncoding.ASCII, 4);
                if (Signature != "WAVE")
                {
                    throw new SignatureNotCorrectException(Signature, "WAVE", er.BaseStream.Position - 4);
                }
                FMT = new FMTBlock(er);
                String sig    = er.ReadString(Encoding.ASCII, 4);
                uint   length = er.ReadUInt32();

                er.BaseStream.Position -= 8;
                if (sig == "LIST")
                {
                    er.BaseStream.Position += length + 8;
                }
                DATA = new DATABlock(er);
            }
Ejemplo n.º 3
0
 public WaveData(byte[] Data, UInt32 SampleRate, UInt16 BitsPerSample, UInt16 NrChannel)
 {
     Signature = "WAVE";
     FMT       = new FMTBlock(SampleRate, BitsPerSample, NrChannel);
     DATA      = new DATABlock(Data);
 }