code: int playAsSoundAt(int buffer,float pitch,float gain,boolean loop,float x, float y, float z) {
  		gain *= soundVolume;
  		if (gain == 0) {
  			gain = 0.001f;
  		}
  		if (soundWorks) {
  			if (sounds) {
  				int nextSource = findFreeSource();
  				if (nextSource == -1) {
  					return -1;
  				}
  				
  				AL10.alSourceStop(sources.get(nextSource));
  				
  				AL10.alSourcei(sources.get(nextSource), AL10.AL_BUFFER, buffer);
  				AL10.alSourcef(sources.get(nextSource), AL10.AL_PITCH, pitch);
  				AL10.alSourcef(sources.get(nextSource), AL10.AL_GAIN, gain); 
  			    AL10.alSourcei(sources.get(nextSource), AL10.AL_LOOPING, loop ? AL10.AL_TRUE : AL10.AL_FALSE);
  			    
  			    sourcePos.clear();
  			    sourceVel.clear();
  				sourceVel.put(new float[] { 0, 0, 0 });
  				sourcePos.put(new float[] { x, y, z });
  			    sourcePos.flip();
  			    sourceVel.flip();
  			    AL10.alSource(sources.get(nextSource), AL10.AL_POSITION, sourcePos);
      			AL10.alSource(sources.get(nextSource), AL10.AL_VELOCITY, sourceVel);
  			    
  				AL10.alSourcePlay(sources.get(nextSource)); 
  				
  				return nextSource;
  			}
  		}
  		
  		return -1;
  	}
docs: Play the specified buffer as a sound effect with the specified
  pitch and gain.
  
  @param buffer The ID of the buffer to play
  @param pitch The pitch to play at
  @param gain The gain to play at
  @param loop True if the sound should loop
  @param x The x position to play the sound from
  @param y The y position to play the sound from
  @param z The z position to play the sound from
  @return source The source that will be used