code: public static Number getValue(ByteBuffer buffer, SampleFormat format, int index) {
  		switch (format) {
  			case U8:
  			case U8P:
  				return buffer.get(index);
  			case S16:
  			case S16P:
  				return buffer.getShort(index);
  			case S32:
  			case S32P:
  				return buffer.getInt(index);
  			case FLT:
  			case FLTP:
  				return buffer.getFloat(index);
  			case DBL:
  			case DBLP:
  				return buffer.getDouble(index);
  
  			default:
  				return 0;
  		}
  	}
docs: Read a {@code Number} at specified index from {@code ByteBuffer} for specified
  {@code SampleFormat}. Depending on the sample format the value is represented by
  a {@code byte, short, integer, float or double} number.
  
  @param buffer {@code ByteBuffer} with audio samples.
  @param format {@code SampleFormat} of audio samples in the buffer.
  @param index  the position in the buffer.
  
  @return a value for a sample format represented by a {@code Number}, or {@code zero}
  if sample format is unknown.