Examples of Obuffer


Examples of javazoom.jl.decoder.Obuffer

      for (int b=0;b<m_equalizer_values.length;b++)
      {
        m_equalizer.setBand(b,m_equalizer_values[b]);         
      }     
      m_decoder.setEqualizer(m_equalizer);
      Obuffer decoderOutput = m_decoder.decodeFrame(header, m_bitstream);
      m_bitstream.closeFrame();
      getCircularBuffer().write(m_oBuffer.getBuffer(), 0, m_oBuffer.getCurrentBufferSize());
      m_oBuffer.reset();
      if (m_header != null) m_header = null;
    }
View Full Code Here

Examples of javazoom.jl.decoder.Obuffer

        sourceStream.reset();
      }
      progressListener.converterUpdate(ProgressListener.UPDATE_FRAME_COUNT, frameCount, 0);


      Obuffer output = null;
      Decoder decoder = new Decoder(decoderParams);
      Bitstream stream = new Bitstream(sourceStream);

      if (frameCount==-1)
        frameCount = Integer.MAX_VALUE;

      int frame = 0;
      long startTime = System.currentTimeMillis();

      try
      {
        for (; frame<frameCount; frame++)
        {
          try
          {
            Header header = stream.readFrame();
            if (header==null)
              break;

            progressListener.readFrame(frame, header);

            if (output==null)
            {
              // REVIEW: Incorrect functionality.
              // the decoder should provide decoded
              // frequency and channels output as it may differ from
              // the source (e.g. when downmixing stereo to mono.)
              int channels = (header.mode()==Header.SINGLE_CHANNEL) ? 1 : 2;
              int freq = header.frequency();
              output = new WaveFileObuffer(channels, freq, destName);
              decoder.setOutputBuffer(output);
            }

            Obuffer decoderOutput = decoder.decodeFrame(header, stream);

            // REVIEW: the way the output buffer is set
            // on the decoder is a bit dodgy. Even though
            // this exception should never happen, we test to be sure.
            if (decoderOutput!=output)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.