title: Wavedata and openal not working
body: <p>I am trying to use <code>openal</code> to play sound in my game.</p>
  
  <p>But when I try to buffer the data with:</p>
  
  <pre><code>AL10.alBufferData(buffer, waveFile.format, waveFile.data,
                  waveFile.samplerate);
  </code></pre>
  
  <p>It gives the Error : <code>AL_INVALID_ENUM</code></p>
  
  <p>I realy dont understand this becouse I am doing what all the tutorials do.
  Please help me.</p>
  
  <p>Here is the code for the sound class that stores the buffer data</p>
  
  <pre><code>public Sound(String path) throws FileNotFoundException {
      int error;
      // Load wav data into a buffer.
      buffer = AL10.alGenBuffers();
  
      error = AL10.alGetError();
      if (error != AL10.AL_NO_ERROR) {
          System.err.println("ERROR: " + Maths.getALErrorString(error));
      }
      InputStream fin = null;
  
      File f = new File(path);
      fin = new FileInputStream(f.getAbsoluteFile());
  
      error = AL10.alGetError();
      if (error != AL10.AL_NO_ERROR) {
          System.err.println("ERROR: " + Maths.getALErrorString(error));
      }
  
      WaveData waveFile = WaveData.create(new BufferedInputStream(fin));
      AL10.alBufferData(buffer, waveFile.format, waveFile.data, waveFile.samplerate);
      // TODO FIX ERROR
  
      error = AL10.alGetError();
      if (error != AL10.AL_NO_ERROR) {
          System.err.println("ERROR: " + Maths.getALErrorString(error));
      }
  
      waveFile.dispose();
  }
  
  public int getBuff() {
      return buffer;
  }
  
  public void setBuff(int buff) {
      this.buffer = buff;
  }
  
  public void destroy() {
      AL10.alDeleteBuffers(buffer);
  }
  </code></pre>
  
  <p>`</p>