code: public long getSampleCount() {
          long total = (_audioInputStream.getFrameLength()
                  * getFormat().getFrameSize() * 8)
                  / getFormat().getSampleSizeInBits();
          return total / getFormat().getChannels();
      }
docs: Return the number of samples of all channels
  
  @return The number of samples for all channels