code: public static WaveData create(ByteBuffer buffer) {
  		try {
  			byte[] bytes = null;
  			
  			if(buffer.hasArray()) {
  				bytes = buffer.array();
  			} else {
  				bytes = new byte[buffer.capacity()];
  				buffer.get(bytes);
  			}
  			return create(bytes);
  		} catch (Exception e) {
  			e.printStackTrace();
  			return null;
  		}
  	}
docs: Creates a WaveData container from the specified ByetBuffer.
  If the buffer is backed by an array, it will be used directly,
  else the contents of the buffer will be copied using get(byte[]).
  
  @param buffer ByteBuffer containing sound file
  @return WaveData containing data, or null if a failure occured