Package javazoom.jl.decoder

Examples of javazoom.jl.decoder.SampleBuffer


     
      if (h==null)
        return false;
       
      // sample buffer set when decoder constructed
      SampleBuffer output = (SampleBuffer)decoder.decodeFrame(h, bitstream);
                                                                         
      synchronized (this)
      {
        out = audio;
        if (out!=null)
        {         
          out.write(output.getBuffer(), 0, output.getBufferLength());
        }       
      }
                                     
      bitstream.closeFrame();
    }   
View Full Code Here


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

      // sample buffer set when decoder constructed
      SampleBuffer output = (SampleBuffer) decoder.decodeFrame(h, bitstream);

      synchronized (this)
      {
        out = audio;
        if(out != null)
        {
          out.write(output.getBuffer(), 0, output.getBufferLength());
        }
      }

      bitstream.closeFrame();
    }
View Full Code Here

     
      if (h==null)
        return false;
       
      // sample buffer set when decoder constructed
      SampleBuffer output = (SampleBuffer)decoder.decodeFrame(h, bitstream);
                                                               
      synchronized (this)
      {
        out = audio;
        if (out!=null)
        {         
          out.write(output.getBuffer(), 0, output.getBufferLength());
        }       
      }
                                     
      bitstream.closeFrame();
    }   
View Full Code Here

      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;
      for(int i = 1; i < output.getBuffer().length; i++) {
          output.getBuffer()[i] = (short) (output.getBuffer()[i] * volume);
       
        if(output.getBuffer()[i] > amplitude) {
          amplitude = output.getBuffer()[i];
        }
      }
     
     
      if(amplitudeListener != null) {
        amplitudeListener.getAmplitude(amplitude);
      }
     
      synchronized (this)
      {
        out = audio;
        if(out != null)
        {
          out.write(output.getBuffer(), 0, output.getBufferLength());
        }
      }

      bitstream.closeFrame();
    }
View Full Code Here

TOP

Related Classes of javazoom.jl.decoder.SampleBuffer

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.