示例#1
0
        public WAV(byte[] file)
        {
            EndianBinaryReader er = new EndianBinaryReader((Stream) new MemoryStream(file), Endianness.LittleEndian);
            bool OK;

            this.Header = new DataBlockHeader(er, "RIFF", out OK);
            if (!OK)
            {
                int num1 = (int)MessageBox.Show("Error 1");
            }
            else
            {
                this.Wave = new WAV.WaveData(er, out OK);
                if (!OK)
                {
                    int num2 = (int)MessageBox.Show("Error 2");
                }
            }
            er.Close();
        }
示例#2
0
 public WAV(byte[] Data, uint SampleRate, ushort BitsPerSample, ushort NrChannel)
 {
     this.Header = new DataBlockHeader("RIFF", (uint)(36 + Data.Length));
     this.Wave   = new WAV.WaveData(Data, SampleRate, BitsPerSample, NrChannel);
 }