Fix rest of the openal examples
This commit is contained in:
parent
ebff02b15a
commit
4f6eaa7280
|
@ -121,7 +121,7 @@ public class EAXTest extends BasicTest {
|
|||
// load sound files (left, center, right).wav
|
||||
Sys.log("Loading Footsteps.wav");
|
||||
WaveData footsteps = WaveData.create("Footsteps.wav");
|
||||
AL10.alBufferData(soundBuffers.get(0), footsteps.format, footsteps.data, footsteps.data.capacity(), footsteps.samplerate);
|
||||
AL10.alBufferData(soundBuffers.get(0), footsteps.format, footsteps.data, footsteps.samplerate);
|
||||
AL10.alSourcef(soundSources.get(0), AL10.AL_PITCH, 1.0f);
|
||||
AL10.alSourcef(soundSources.get(0), AL10.AL_GAIN, 1.0f);
|
||||
AL10.alSourcei(soundSources.get(0), AL10.AL_BUFFER, soundBuffers.get(0));
|
||||
|
|
|
@ -116,7 +116,6 @@ public class MovingSoundTest extends BasicTest {
|
|||
buffers.get(0),
|
||||
wavefile.format,
|
||||
wavefile.data,
|
||||
wavefile.data.capacity(),
|
||||
wavefile.samplerate);
|
||||
if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
|
||||
exit(lastError);
|
||||
|
|
|
@ -157,7 +157,6 @@ public class OpenALCreationTest {
|
|||
buffers.get(0),
|
||||
wavefile.format,
|
||||
wavefile.data,
|
||||
wavefile.data.capacity(),
|
||||
wavefile.samplerate);
|
||||
if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
|
||||
exit(lastError);
|
||||
|
|
|
@ -111,14 +111,14 @@ public class PlayTestMemory extends BasicTest {
|
|||
//ALUTLoadWAVData file = alut.loadWAVMemory(Sys.getDirectBufferAddress(filebuffer));
|
||||
if(usingVorbis) {
|
||||
// pass directly to buffer data
|
||||
AL10.alBufferData(buffers.get(0), AL10.AL_FORMAT_VORBIS_EXT, filebuffer, -1, -1);
|
||||
AL10.alBufferData(buffers.get(0), AL10.AL_FORMAT_VORBIS_EXT, filebuffer, -1);
|
||||
filebuffer.clear();
|
||||
} else {
|
||||
// load wave data from buffer
|
||||
WaveData wavefile = WaveData.create(filebuffer.array());
|
||||
|
||||
//copy to buffers
|
||||
AL10.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.data.capacity(), wavefile.samplerate);
|
||||
AL10.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.samplerate);
|
||||
|
||||
//unload file again
|
||||
wavefile.dispose();
|
||||
|
|
|
@ -108,7 +108,6 @@ public class StressTest extends BasicTest {
|
|||
buffers.get(i - 1),
|
||||
data.format,
|
||||
data.data,
|
||||
data.data.capacity(),
|
||||
data.samplerate);
|
||||
|
||||
if (AL10.alGetError() != AL10.AL_NO_ERROR) {
|
||||
|
|
Loading…
Reference in New Issue