Package org.lwjgl.util

Examples of org.lwjgl.util.WaveData.dispose()


    // copy to buffers
    AL10.alBufferData(buffers[bufferIndex], wavefile.format, wavefile.data, wavefile.samplerate);

    // unload file again
    wavefile.dispose();

    // return index for this sound
    return bufferIndex++;
  }
View Full Code Here


          //copy to buffers
          AL10.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.samplerate);
       
          //unload file again
          wavefile.dispose();       
        }
       
        // check for errors
        if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
            exit(lastError);
View Full Code Here

          //copy to buffers
          AL10.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.samplerate);
         
          //unload file again
          wavefile.dispose();       
        }
       
        if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
            exit(lastError);
        }       
View Full Code Here

        AL10.alDeleteBuffers(buffers);

        alExit();
      }
    }
    data.dispose();
  }

  public void runTest() {
    int iterations = 0;
    int randomBuffer;
View Full Code Here

    if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
      exit(lastError);
    }

    //unload file again
    wavefile.dispose();

    //set up source input
    AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0));
    if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
      exit(lastError);
View Full Code Here

            System.out.println("Failed to load Footsteps.wav! Skipping playback test.");
            AL.destroy();
            return;
        }
        AL10.alBufferData(buffer, waveFile.format, waveFile.data, waveFile.samplerate);
        waveFile.dispose();
        AL10.alSourcei(source, AL10.AL_BUFFER, buffer);
        AL10.alSourcei(source, AL10.AL_LOOPING, AL10.AL_TRUE);

        System.out.println("Playing sound unaffected by EFX ...");
        AL10.alSourcePlay(source);
View Full Code Here

    if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
      exit(lastError);
    }

    //unload file again
    wavefile.dispose();

    //set up source input
    AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0));
    if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
      exit(lastError);
View Full Code Here

      //copy to buffers
      AL10.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.samplerate);

      //unload file again
      wavefile.dispose();

        if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
            exit(lastError);
        }
View Full Code Here

        }
        WaveData data = WaveData.create(new BufferedInputStream(new FileInputStream("res" + File.separatorChar +
                "sounds" + File.separatorChar + "thump.wav")));
        int buffer = alGenBuffers();
        alBufferData(buffer, data.format, data.data, data.samplerate);
        data.dispose();
        int source = alGenSources();
        alSourcei(source, AL_BUFFER, buffer);
        while (!Display.isCloseRequested()) {
            while (Keyboard.next()) {
                if (Keyboard.isKeyDown(Keyboard.KEY_SPACE)) {
View Full Code Here

                        map = new HashMap<String, Serializable>();
                        if (waveFile != null) {
                            map.put("data", new BufferIO(waveFile.data));
                            map.put("format", waveFile.format);
                            map.put("samplerate", waveFile.samplerate);
                            waveFile.dispose();
                            loaded = true;
                            _ALCache.put(filename, map);
                            if (JXAenvUtils._debug) {
                                System.err.println(" openAL sound");
                            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.