Recurity.Swf.TagHandler.DefineSound.Parse C# (CSharp) Method

Parse() protected method

protected Parse ( ) : void
return void
        protected override void Parse()
        {
            BinaryReader br = new BinaryReader(this._dataStream);
            BitStream bits = new BitStream(this._dataStream);

            this._soundID = br.ReadUInt16();
            this._soundFormat = getFormat(bits.GetBits(4));
            this._soundRate = getSoundRate(bits.GetBits(2));
            this._soundSize = (bits.GetBits(1) == 0) ? SoundSize.snd_8bit : SoundSize.snd_16bit;
            this._soundType = (bits.GetBits(1) == 0) ? SoundType.mono : SoundType.stereo;
            this._soundSampleCount = br.ReadUInt32();

            this._requiredVersion = getRequiredVersion(this._soundFormat);

            // TODO: check buffersize
            // Casting from UInt32 to int !!!!
            this._soundData = br.ReadBytes((int)Tag.Length - 7);

            String s = String.Format("\t{0} {1}", Tag.Length, Length);
            //Log.Debug(this, s);
        }