// load sound files (left, center, right).wav
LWJGLUtil.log("Loading soundfiles...");
LWJGLUtil.log("Loading left.wav");
WaveData left = WaveData.create("left.wav");
alBufferData(soundBuffers.get(LEFT), left.format, left.data, left.samplerate);
alSourcef(soundSources.get(LEFT), AL_PITCH, 1.0f);
alSourcef(soundSources.get(LEFT), AL_GAIN, 1.0f);
alSource(soundSources.get(LEFT), AL_POSITION, leftPosition);
alSource(soundSources.get(LEFT), AL_VELOCITY, leftVelocity);
alSourcei(soundSources.get(LEFT), AL_BUFFER, soundBuffers.get(LEFT));
alSourcei(soundSources.get(LEFT), AL_LOOPING, AL_TRUE);
LWJGLUtil.log("Loading center.wav");
WaveData center = WaveData.create("center.wav");
alBufferData(soundBuffers.get(CENTER), center.format, center.data, center.samplerate);
alSourcef(soundSources.get(CENTER), AL_PITCH, 1.0f);
alSourcef(soundSources.get(CENTER), AL_GAIN, 1.0f);
alSource(soundSources.get(CENTER), AL_POSITION, centerPosition);
alSource(soundSources.get(CENTER), AL_VELOCITY, centerVelocity);
alSourcei(soundSources.get(CENTER), AL_BUFFER, soundBuffers.get(CENTER));
alSourcei(soundSources.get(CENTER), AL_LOOPING, AL_TRUE);
LWJGLUtil.log("Loading right.wav");
WaveData right = WaveData.create("right.wav");
alBufferData(soundBuffers.get(RIGHT), right.format, right.data, right.samplerate);
alSourcef(soundSources.get(RIGHT), AL_PITCH, 1.0f);
alSourcef(soundSources.get(RIGHT), AL_GAIN, 1.0f);
alSource(soundSources.get(RIGHT), AL_POSITION, rightPosition);
alSource(soundSources.get(RIGHT), AL_VELOCITY, rightVelocity);