Package org.kc7bfi.jflac.frame

Examples of org.kc7bfi.jflac.frame.Frame


          e.printStackTrace();
        }
      }
    }
    try {
      Frame frame = decoder.readNextFrame();
      if (frame != null) {
        pcmData = decoder.decodeFrame(frame, null);
        System.arraycopy(pcmData.getData(), 0, buffer, 0, pcmData.getLen());
      }else{
        return -1;
View Full Code Here


                int len = byteData.getLen() - offset;
                System.arraycopy(byteData.getData(), offset, buf, 0, len);
                offset = -1;
                return len;
            }
            Frame readFrame = decoder.readNextFrame();
            if (readFrame == null) {
                return -1;
            }
            byteData.setData(buf);
            decoder.decodeFrame(readFrame, byteData);
View Full Code Here

//                System.out.println("Seek to: " + pos);
                inputFile.seek(pos);
//                decoder.getBitInputStream().skipBitsNoCRC(1);
                decoder.getBitInputStream().reset();

                Frame frame = decoder.readNextFrame();
//                System.out.println("Found: " + frame.header.sampleNumber);
                if (frame.header.sampleNumber <= target_sample &&
                        target_sample <= frame.header.sampleNumber + frame.header.blockSize) {
//                    System.out.println("Done seeking");
                    offset = (int) (target_sample - frame.header.sampleNumber) * frame.header.channels * frame.header.bitsPerSample / 8;
View Full Code Here

            initDecoder();
        }
        if (decoder.isEOF()) {
            buffer.setEOF(true);
        } else {
            Frame frame = decoder.readNextFrame();
            if (frame != null) {
                pcmData = decoder.decodeFrame(frame, pcmData);
                processPCM(pcmData);
            }
        }
View Full Code Here

TOP

Related Classes of org.kc7bfi.jflac.frame.Frame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.