Recurity.Swf.TagHandler.SoundStreamHead.Write C# (CSharp) Method

Write() public method

public Write ( Stream output ) : void
output Stream
return void
        public override void Write(Stream output)
        {
            WriteTagHeader(output);

            BitStream bits = new BitStream(output);
            bits.WriteBits(4, 0);
            bits.WriteBits(2, DefineSound.getSoundRateID(PlaybackRate));
            bits.WriteBits(1, PlaybackSize == SoundSize.snd_8bit ? 0 : 1);
            bits.WriteBits(1, PlaybackType == SoundType.mono ? 0 : 1);

            bits.WriteBits(4, DefineSound.getFormatID(StreamCompression));
            bits.WriteBits(2, DefineSound.getSoundRateID(StreamRate));
            bits.WriteBits(1, StreamSize == SoundSize.snd_8bit ? 0 : 1);
            bits.WriteBits(1, StreamType == SoundType.mono ? 0 : 1);

            bits.WriteFlush();

            BinaryWriter bw = new BinaryWriter(output);

            bw.Write(AvarageCount);

            if(StreamCompression == SoundEncoding.MP3)
                bw.Write(this.LatencySeek);
        }