Esempio n. 1
0
        public STRM(byte[] file)
        {
            EndianBinaryReader er = new EndianBinaryReader((Stream) new MemoryStream(file), Endianness.LittleEndian);
            bool OK;

            this.Header = new FileHeader.HeaderInfo(er, nameof(STRM), out OK);
            if (!OK)
            {
                int num1 = (int)MessageBox.Show("Error 1");
            }
            else
            {
                this.Head = new STRM.HeadSection(er, out OK);
                if (!OK)
                {
                    int num2 = (int)MessageBox.Show("Error 2");
                }
                else
                {
                    this.Data = new STRM.DataSection(er, out OK);
                    if (!OK)
                    {
                        int num3 = (int)MessageBox.Show("Error 2");
                    }
                }
            }
            er.Close();
        }
Esempio n. 2
0
 public WAV ToWave()
 {
     this.Data.Data = this.Head.NrChannel != (byte)2 ? this.GetChannelMono(this.Data.Data, this.Head.nBlock, this.Head.nBlockLength, this.Head.nLastBlockLen, (int)this.Head.nWaveType) : this.GetChannelsStereo(this.Data.Data, this.Head.nBlock, this.Head.nBlockLength, this.Head.nLastBlockLen, (int)this.Head.nWaveType);
     return(this.Head.nWaveType == (byte)0 ? new WAV(this.Data.Data, (uint)this.Head.nSampleRate, (ushort)8, (ushort)this.Head.NrChannel) : new WAV(this.Data.Data, (uint)this.Head.nSampleRate, (ushort)16, (ushort)this.Head.NrChannel));
 }