Fix rest of the openal examples

This commit is contained in:
Elias Naur 2004-04-09 21:38:31 +00:00
parent ebff02b15a
commit 4f6eaa7280
5 changed files with 6 additions and 9 deletions

View File

@ -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));
@ -286,4 +286,4 @@ public class EAXTest extends BasicTest {
EAXTest eaxTest = new EAXTest();
eaxTest.execute(args);
}
}
}

View File

@ -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);

View File

@ -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);
@ -221,4 +220,4 @@ public class OpenALCreationTest {
OpenALCreationTest oalCreationTest = new OpenALCreationTest();
oalCreationTest.execute(args);
}
}
}

View File

@ -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();

View File

@ -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) {
@ -218,4 +217,4 @@ public class StressTest extends BasicTest {
StressTest stressTest = new StressTest();
stressTest.execute(args);
}
}
}