title: ByteBuffer from short to byte[]
body: <p>I let the user record a short snippet of sound. It´s stored as short[]</p>
  
  <pre><code>final int samples = 44100;
  boolean isMono = true;
  final short[] data = new short[samples * 5];
  final AudioRecorder recorder = Gdx.audio.newAudioRecorder(samples, isMono);
  final AudioDevice player = Gdx.audio.newAudioDevice(samples, isMono);
  ByteBuffer buffer;
  </code></pre>
  
  <p>start to record:</p>
  
  <pre><code>public void startRecord(){
      new Thread(new Runnable() {
          @Override
          public void run() {
                  System.out.println("Record start:");
                  recorder.read(data, 0, data.length);
                  recorder.dispose();
                  //buffer.putShort(data[1]);
                  System.out.println("Record ended:");
              }
  
      }).start();
  }
  </code></pre>
  
  <p>And play the recorded sound:</p>
  
  <pre><code>public void playRecorded(){
      new Thread(new Runnable() {
          @Override
          public void run() {
              player.writeSamples(data, 0, data.length);
              player.dispose();
  
          }
      }).start();
  }
  </code></pre>
  
  <p>I now need to store their audio snippet in filehandle. And to do so I need to convert it to byte[] from what I know. </p>