public static GbAudio rewriteTo4bitSimple(short[] samples) {
    int len = samples.length / 2;
    int[] outSamples = new int[len * 2];
    int[] soValues = new int[len];

    for (int pos = 0; pos < len; pos++) {
      int so = 7;
      for (int offset = 0; offset < 2; offset++) {
        int minError = Integer.MAX_VALUE;
        int minErrorLevel = 0;
        for (int level = 0; level < 16; level++) {
          int error = Math.abs(samples[2 * pos + offset] - getSample(level, so));
          if (error < minError) {
            minError = error;
            minErrorLevel = level;
          }
        }
        outSamples[2 * pos + offset] = minErrorLevel;
      }
      soValues[pos] = so;
    }

    return new GbAudio(outSamples, soValues);
  }