code: public void decodeBytes(byte[] audioBytes, double[] audioSamples) {
          int sampleSizeInBytes = getFormat().getSampleSizeInBits() / 8;
          int[] sampleBytes = new int[sampleSizeInBytes];
          int k = 0; // index in audioBytes
          for (int i = 0; i < audioSamples.length; i++) {
              // collect sample byte in big-endian order
              if (getFormat().isBigEndian()) {
                  // bytes start with MSB
                  for (int j = 0; j < sampleSizeInBytes; j++) {
                      sampleBytes[j] = audioBytes[k++];
                  }
              } else {
                  // bytes start with LSB
                  for (int j = sampleSizeInBytes - 1; j >= 0; j--) {
                      sampleBytes[j] = audioBytes[k++];
                      if (sampleBytes[j] != 0)
                          j = j + 0;
                  }
              }
              // get integer value from bytes
              int ival = 0;
              for (int j = 0; j < sampleSizeInBytes; j++) {
                  ival += sampleBytes[j];
                  if (j < sampleSizeInBytes - 1)
                      ival <<= 8;
              }
              // decode value
              double ratio = Math.pow(2., getFormat().getSampleSizeInBits() - 1);
              double val = ((double) ival) / ratio;
              audioSamples[i] = val;
          }
      }
docs: <p>decodeBytes.</p>
  
  @param audioBytes   an array of byte.
  @param audioSamples an array of double.