LWJGL
May 18, 2013, 16:13:57 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL is now using GitHub
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: OpenAL  (Read 7971 times)
NickyP101
Newbie
*
Posts: 23


« on: April 06, 2005, 02:02:56 »

Trying to run the test for OpenAL and getting the following:


C:\LWJGL\lwjgl-win32-0.96>  java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\
lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar; -Djava.library.path=nati
ve org.lwjgl.test.openal.PositionTest
java.io.IOException: Stream closed
        at java.io.BufferedInputStream.getInIfOpen(Unknown Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at java.io.DataInputStream.readInt(Unknown Source)
        at com.sun.media.sound.WaveFileReader.getFMT(Unknown Source)
        at com.sun.media.sound.WaveFileReader.getAudioInputStream(Unknown Source
)
        at javax.sound.sampled.AudioSystem.getAudioInputStream(Unknown Source)
        at org.lwjgl.util.WaveData.create(WaveData.java:93)
        at org.lwjgl.test.openal.PositionTest.setup(PositionTest.java:199)
        at org.lwjgl.test.openal.PositionTest.execute(PositionTest.java:127)
        at org.lwjgl.test.openal.PositionTest.main(PositionTest.java:486)
Error setting up demonstration:
java.lang.NullPointerException
        at org.lwjgl.test.openal.PositionTest.setup(PositionTest.java:200)
        at org.lwjgl.test.openal.PositionTest.execute(PositionTest.java:127)
        at org.lwjgl.test.openal.PositionTest.main(PositionTest.java:486)

C:\LWJGL\lwjgl-win32-0.96>

Why is this?

Also when i try and run the OpenGL Test's i get the following error (just stating it incase it is useful):

C:\LWJGL\lwjgl-win32-0.96>  java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\
lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar; -Djava.library.path=nati
ve org.lwjgl.test.opengl.shaders.ShadersTest none
Setting display mode to: 1024 x 768 x 32 @85Hz
Exception in thread "main" java.lang.NullPointerException
        at org.lwjgl.test.opengl.shaders.ShadersTest.initialize(ShadersTest.java
:177)
        at org.lwjgl.test.opengl.shaders.ShadersTest.main(ShadersTest.java:78)

Any help would be soo greatly appreciated. I've been trying to get 3D sound in my 2d game all week now, i started of with JOAL but that wasnt working (jvm crash for some reason) and then i turned to LWJGL for the OpenAL and now it is not working either.

Cheers, Nick!
Logged
Matzon
Administrator
Demigod
*****
Posts: 2237



« Reply #1 on: April 06, 2005, 02:10:46 »

oal is failing because it's not finding the samples (?) - should be located in the res folder, which you're including in the classpath - so everything should be fine...

Not sure about shades though
Logged

NickyP101
Newbie
*
Posts: 23


« Reply #2 on: April 06, 2005, 02:15:42 »

Yeah its strange, im using Java1.5.0 with the latest versino of LWJGL .96 i think it is. Ill try a couple more things and get back to you. Btw the first OpenAL test works -

C:\LWJGL\lwjgl-win32-0.96>  java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\
lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar; -Djava.library.path=nati
ve org.lwjgl.test.openal.ALCTest
DEFAULT_DEVICE_SPECIFIER: DirectSound3D
DEVICE_SPECIFIER: DirectSound3D
EXTENSIONS: Enumeration
ALC_MAJOR_VERSION: 1
ALC_MINOR_VERSION: 0
Value of ALC_MAJOR_VERSION: 4096

Does that mean its not going to be a complex problem to fix?

Also after running Lesson2 (provided in the tutorial i get same error) even though i have provided the Footsteps.wav in the current directory and the res directory??
Logged
NickyP101
Newbie
*
Posts: 23


« Reply #3 on: April 06, 2005, 02:36:08 »

Just a note on what ive done to set this up.

I've downloaded the LWJGL .96, extracted it to C:\LWJGL. Thats all? Do i need something else?? When i was using JOAL i downloaded the OpenAL sdk, do i need that??
Logged
Matzon
Administrator
Demigod
*****
Posts: 2237



« Reply #4 on: April 06, 2005, 04:08:04 »

openal works fine here- using the exact same setup...
Quote
C:\LWJGL\lwjgl-win32-0.96>dir
 Volume in drive C has no label.
 Volume Serial Number is FC52-0BDD

 Directory of C:\LWJGL\lwjgl-win32-0.96

06-04-2005  13:06    <DIR>          .
06-04-2005  13:06    <DIR>          ..
06-04-2005  12:54    <DIR>          doc
06-04-2005  12:54    <DIR>          jar
06-04-2005  12:54    <DIR>          native
30-03-2005  19:44             2.439 README
06-04-2005  12:54    <DIR>          res
               1 File(s)          2.439 bytes
               6 Dir(s)   9.474.084.864 bytes free

C:\LWJGL\lwjgl-win32-0.96>


as for shaders, it's because it cant locate its shaders - the code is loading its resources in a wrong way - will fix for next release
Logged

NickyP101
Newbie
*
Posts: 23


« Reply #5 on: April 06, 2005, 04:13:48 »

Ok ill do it again:

So what do i do?

I download version .96 to C:\LWJGL

Then i extract that to C:\LWJGL

Then inside C:\LWJGL\lwjgl-win32-0.96\ i have all the folders and the readme etc.

Now to test the OpenAL i cd in command prompt to C:\LWJGL\lwjgl-win32-0.96, then ;

java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar; -Djava.library.path=native org.lwjgl.test.openal.PositionTest

Is that what i should be doing?
Logged
NickyP101
Newbie
*
Posts: 23


« Reply #6 on: April 06, 2005, 04:25:56 »

Could this in anyway be sounds card related? Or a driver problem?
Logged
NickyP101
Newbie
*
Posts: 23


« Reply #7 on: April 06, 2005, 04:41:45 »

Actually 1 thing, im using the java1.5.0 sdk but my jre is 1.5.0_02 (latest), so therefor im pretty sure im running the test on the jre version.
Logged
NickyP101
Newbie
*
Posts: 23


« Reply #8 on: April 06, 2005, 06:01:06 »

Fixed it Smiley I forgot i had also put the dll in the jre bin Tongue never mind, thanks guys!
Logged
Matzon
Administrator
Demigod
*****
Posts: 2237



« Reply #9 on: April 06, 2005, 06:09:02 »

HMM - you shouldn't have to do that *ponder*
Logged

Skippy0
Newbie
*
Posts: 14


« Reply #10 on: April 30, 2005, 05:41:25 »

Code:
WaveData.create(String filepath)


It is not a file-path, but a resource-path!

I tried absolute-paths and they all failed to load...
I tried relative-paths, and they also failed... (relative from "user.dir")
then I checked the source-code..

Code:
WaveData.class.getClassLoader().getResourceAsStream(filepath)


Which explained it... I'm now using WaveData.create(byte[] buf) as that just does what it says.

Please rename the parameter.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!