Esempio n. 1
0
        public FlacBlock(byte[] rawFlacBlock, FlacTagBlockHeader blockHeader)
        {
            RawFlacBlock = rawFlacBlock;
            BlockHeader  = blockHeader;
            var encoding = new UTF8Encoding(true);

            Content = encoding.GetString(rawFlacBlock);
        }
Esempio n. 2
0
 public void InitBlocks(BinaryReader br)
 {
     for (;;)
     {
         FlacTagBlockHeader blockHeader       = new FlacTagBlockHeader(br.ReadBytes(4));
         byte[]             blockContentBytes = br.ReadBytes(blockHeader.BlockSize);
         BlocksList.Add(new FlacBlock(blockContentBytes, blockHeader));
         if (blockHeader.IsLastMetaData)
         {
             break;
         }
     }
 }
Esempio n. 3
0
 private void BuildFrameHeader()
 {
     byte[] tempBytes = new byte[4];
     Buffer.BlockCopy(RawHeaderBytes, 0, tempBytes, 0, 4);
     BlockHeader = new FlacTagBlockHeader(tempBytes);
 }
Esempio n. 4
0
 private void InitHeader()
 {
     byte[] headerBytes = new byte[4];
     Buffer.BlockCopy(RawFlacBlock, 0, headerBytes, 0, 4);
     BlockHeader = new FlacTagBlockHeader(headerBytes);
 }