Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
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 2460 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?

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

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (48 views)
2014-11-29 21:32:03

toopeicgaming1999 (115 views)
2014-11-26 15:22:04

toopeicgaming1999 (103 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org 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‑gaming.org
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!