I don’t see the problem you’re seeing wtih the SourcesSharingBuffers demo.
Well, I found other people with the same problem and there seems to be a definite limit to how many sources you can create, and they should be reused from what I can tell
What is the device name reported by that demo?
“Generic Hardware” - which isn’t good because I have a NICE sound card and cannot find out how to get an enumerated list of available devices or select one or what not. Here’s the code I’m using:
ALC.Device device = null;
ALC.Context context;
String deviceSpecifier = null;
String deviceName = "DirectSound3D";
device = alc.alcOpenDevice(deviceName);
deviceSpecifier = alc.alcGetString(device, ALC.ALC_DEVICE_SPECIFIER);
context = alc.alcCreateContext(device, null);
alc.alcMakeContextCurrent(context);
… I don’t like the idea of hard coding “DirectSound3D”, but when I do this: device = alc.alcOpenDevice(null) I get a NullPointerException, which I shouldn’t be getting, or at least OpenAL won’t blow up on that call (from what I can tell).
Using the “Generic Software” driver and the OpenAL 1.1 binaries from openal.org I was easily able to add 100+ water drops without any errors being reported from alGenSources. I don’t know whether there might be a bug in the glue code for the version of JOAL you’re using but I’m using the gluegen-branch-1-0 branch in which all of the JNI code, etc. has been rewritten. If you would like me to post a test binary for you to try let me know which platform you’re on.
Well, again, I think all I need to know is how to attach a source to a buffer (without using al.alGenSources()). That and how do I get a list of available devices?
But any help is greatly appreciated.
WinXP
Intel P4 3gHz
1GB RAM
Creative 5.1 Soundcard