code: public void decode(SeekPoint from, SeekPoint to) throws IOException {
          // position random access file
          if (!(inputStream instanceof RandomFileInputStream)) throw new IOException("Not a RandomFileInputStream: " + inputStream.getClass().getName());
          ((RandomFileInputStream)inputStream).seek(from.getStreamOffset());
          bitStream.reset();
          samplesDecoded = from.getSampleNumber();
          
          //state = DECODER_SEARCH_FOR_FRAME_SYNC;
          try {
              while (true) {
                  //switch (state) {
                  //case DECODER_SEARCH_FOR_METADATA :
                  //    readStreamSync();
                  //    break;
                  //case DECODER_READ_METADATA :
                  //    Metadata metadata = readNextMetadata();
                  //    if (metadata == null) break;
                  //    break;
                  //case DECODER_SEARCH_FOR_FRAME_SYNC :
                  findFrameSync();
                  //    break;
                  //case DECODER_READ_FRAME :
                  try {
                      readFrame();
                      frameListeners.processFrame(frame);
                      callPCMProcessors(frame);
                  } catch (FrameDecodeException e) {
                      badFrames++;
                  }
                  //frameListeners.processFrame(frame);
                  //callPCMProcessors(frame);
                  //System.out.println(samplesDecoded +" "+ to.getSampleNumber());
                  if (to != null && samplesDecoded >= to.getSampleNumber()) return;
                  //    break;
                  //case DECODER_END_OF_STREAM :
                  //case DECODER_ABORTED :
                  //    return;
                  //default :
                  //    throw new IOException("Unknown state: " + state);
                  //}
              }
          } catch (EOFException e) {
              eof = true;
          }
      }
docs: Decode the data frames between two seek points.
  @param from  The starting seek point
  @param to    The ending seek point (non-inclusive)
  @throws IOException  On read error