3D Sound

Finally I brought Joal to work (thanks Ken Russell).
I downloaded “lesson1” from devmaster. This demo plays a stereo file through the two front speakers. I changed the source - and listener position, but it is still only coming from the frontspeakers. (I got a 5.1 Soundcard from C-Media; The console demo, that comes with the openal sdk works properly with all 5 speakers)
When I took a mono file instead of a stereo file, I didn’t hear anything at all.

So what do I have to do to play a mono file from any direction I want. Are there any sample codes, tutorials or demos out there? Where?

By the way: Is it possible to change the position of the speakers?

Diggi

Which test from the OpenAL SDK do you mean? Is it the one with the following menu?


Select a test from the following options

1 Position Test
2 Looping Test
...

JOAL does nothing except expose the OpenAL entry points, so in theory any code transliterated to Java using JOAL should work the same as the identical C code.

One thing that might be missing is that JOAL doesn’t currently support alcGetString(NULL, ALC_DEVICE_SPECIFIER due to how OpenAL returns the resulting string. This has been on the to-do list for a while and I’ll try to add it today. However if you’re using the default device then there probably shouldn’t be a difference in behavior between the C and Java code. You might try printing alcGetString(device, ALC_DEVICE_SPECIFIER) in your Java code to see what device you’re using.

OK, a new entry point alcGetDeviceSpecifiers() is now present in the JOAL CVS repository. If you set up your machine to build JOAL you should be able to pick it up right away. Let me know if you need a one-off build for a given platform. Unfortunately we don’t have nightly builds set up yet.

Select a test from the following options

1 Position Test
2 Looping Test

Yes it is this one. When you have a 5.1 speaker system and soundcard and you chose -1- you will hear a short sound from the left rear speaker. You can add in a sound from the right front speaker.
This is actually my only question: How can I make a sound to come from any position in the room I choose. And I want to use a 5.1 Soundsystem. The Sound and Listener positions didn’t work out with stereofiles and monofiles did not work at all.

I’m sorry, I did a mistake. I set a very large distance between the listener and the source, so it was not quiet to hear anything. I decreased the distance and now it is working perfect. thanks for the help
diggi