Logo Search packages:      
Sourcecode: libjlayer-java version File versions  Download package

void javazoom::jl::decoder::Bitstream::parse_frame (  )  throws BitstreamException [inline, package]

Parses the data previously read with read_frame_data().

Definition at line 498 of file Bitstream.java.

References bitindex, frame_bytes, framebuffer, framesize, and wordpointer.

  {
      // Convert Bytes read to int
      int   b=0;
      byte[] byteread = frame_bytes;
      int bytesize = framesize;

      // Check ID3v1 TAG (True only if last frame).
      //for (int t=0;t<(byteread.length)-2;t++)
      //{
      //    if ((byteread[t]=='T') && (byteread[t+1]=='A') && (byteread[t+2]=='G'))
      //    {
      //          System.out.println("ID3v1 detected at offset "+t);
      //          throw newBitstreamException(INVALIDFRAME, null);
      //    }     
      //}
      
      for (int k=0;k<bytesize;k=k+4)
      {
            int convert = 0;
            byte b0 = 0;
            byte b1 = 0;
            byte b2 = 0;
            byte b3 = 0;
            b0 = byteread[k];
            if (k+1<bytesize) b1 = byteread[k+1];
            if (k+2<bytesize) b2 = byteread[k+2];
            if (k+3<bytesize) b3 = byteread[k+3];
            framebuffer[b++] = ((b0 << 24) &0xFF000000) | ((b1 << 16) & 0x00FF0000) | ((b2 << 8) & 0x0000FF00) | (b3 & 0x000000FF);
      }
      wordpointer = 0;
    bitindex = 0;
  }


Generated by  Doxygen 1.6.0   Back to index