Package javazoom.jl.decoder

Examples of javazoom.jl.decoder.Header


      try {
        OutputBuffer outputBuffer = null;
        int sampleRate = -1, channels = -1;
        while (true) {
          Header header = bitstream.readFrame();
          if (header == null) break;
          if (outputBuffer == null) {
            channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
            outputBuffer = new OutputBuffer(channels, false);
            decoder.setOutputBuffer(outputBuffer);
            sampleRate = header.getSampleRate();
          }
          try {
            decoder.decodeFrame(header, bitstream);
          } catch (Exception ignored) {
            // JLayer's decoder throws ArrayIndexOutOfBoundsException sometimes!?
View Full Code Here


    {
      AudioDevice out = audio;
      if (out==null)
        return false;

      Header h = bitstream.readFrame()
     
      if (h==null)
        return false;
       
      // sample buffer set when decoder constructed
View Full Code Here

    try
    {
      AudioDevice out = audio;
      if (out == null) return false;

      Header h = bitstream.readFrame();
      if (h == null) return false;

      // sample buffer set when decoder constructed
      SampleBuffer output = (SampleBuffer) decoder.decodeFrame(h, bitstream);
      short amplitude = 0;
View Full Code Here

   * skips over a single frame
   * @return false  if there are no more frames to decode, true otherwise.
   */
  protected boolean skipFrame() throws JavaLayerException
  {
    Header h = bitstream.readFrame();
    if (h == null) return false;
    bitstream.closeFrame();
    return true;
  }
View Full Code Here

    bitstream.closeFrame();
    return true;
  }
 
  protected int skipFrameWithLength() throws JavaLayerException{
    Header h = bitstream.readFrame();
    if(h == null) return -1;
    int framesize = h.framesize;
    int ret = h.max_number_of_frames(framesize);
    return ret;
  }
View Full Code Here

TOP

Related Classes of javazoom.jl.decoder.Header

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.