title: Storing short[] in a file using Libgdx filehandle
body: <p>I record some audio using libgdx AudioRecorder which return short[]. I think I´ve converted it into byte[] instead so it can be stored in a file cause I need the audio to be able to playback anytime.
  Here´s some variables I use:</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);
  </code></pre>
  
  <p>And here I start and play the audio, also I think I´ve converted the short[] into byte[] , correct me if Im wrong.</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();
                  ShortBuffer buffer = BufferUtils.newShortBuffer(2);
                  buffer.put(data[1]);
          }
      }).start();
  
  }
  
  public void playRecorded(){
      new Thread(new Runnable() {
          @Override
          public void run() {
              player.writeSamples(data, 0, data.length);
              player.dispose();
          }
      }).start();
  }
  </code></pre>
  
  <p>Here´s an example on how I´ve stored byte[] before. But I can´t implement this teqhnique on this method. Bare in mind I need it to be a libgdx solution.</p>
  
  <pre><code>public void onImagePicked(final InputStream stream) {
                  loading = "Loading";
                  pending = executor.submit(new AsyncTask&lt;Pixmap&gt;() {
                      @Override
                      public Pixmap call() throws Exception {
                          StreamUtils.copyStream(stream, file.write(false));
                           final byte[] bytes = file.readBytes();
                          final Pixmap pix = new Pixmap(bytes, 0, bytes.length);
                          return pix;
  
                      }
                  });
              }
  </code></pre>