Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (604)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (654)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  3D Sound  (Read 2591 times)
0 Members and 1 Guest are viewing this topic.
Offline Diggi

Senior Newbie

« Posted 2006-02-19 20:53:19 »

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?

Offline Ken Russell

JGO Coder

Java games rock!

« Reply #1 - Posted 2006-02-19 21:51:20 »

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.

Offline Ken Russell

JGO Coder

Java games rock!

« Reply #2 - Posted 2006-02-20 01:35:03 »

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.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Diggi

Senior Newbie

« Reply #3 - Posted 2006-02-20 19:30:55 »

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.
Offline Diggi

Senior Newbie

« Reply #4 - Posted 2006-02-20 19:47:42 »

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
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

bilznatch (24 views)
2015-08-04 11:03:17

SHC (40 views)
2015-08-01 03:58:20

Jesse (24 views)
2015-07-29 04:35:27

Riven (47 views)
2015-07-27 16:38:00

Riven (25 views)
2015-07-27 15:35:20

Riven (27 views)
2015-07-27 12:26:13

Riven (18 views)
2015-07-27 12:23:39

BurntPizza (41 views)
2015-07-25 00:14:37

BurntPizza (55 views)
2015-07-24 22:06:39

BurntPizza (34 views)
2015-07-24 06:06:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!