Exemplo n.º 1
0
        VidAudioStartFrame ReadAudioStartFrame()
        {
            VidAudioStartFrame block = new VidAudioStartFrame();

            block.Unknown1     = reader.ReadUInt16();
            block.PlaybackRate = reader.ReadByte();
            block.DataLength   = reader.ReadUInt16();
            audioBuffer        = reader.ReadBytes(block.DataLength);

            if (block.PlaybackRate != 166)
            {
                throw new Exception("VidFile: Unknown PlaybackRate encountered.");
            }

            return(block);
        }
        VidAudioStartFrame ReadAudioStartFrame(BinaryReader reader)
        {
            VidAudioStartFrame block = new VidAudioStartFrame();
            block.Unknown1 = reader.ReadUInt16();
            block.PlaybackRate = reader.ReadByte();
            block.DataLength = reader.ReadUInt16();
            audioBuffer = reader.ReadBytes(block.DataLength);

            if (block.PlaybackRate != 166)
                throw new Exception("VidFile: Unknown PlaybackRate encountered.");

            return block;
        }