Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (756)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
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  
  OpenAL issues  (Read 2137 times)
0 Members and 1 Guest are viewing this topic.
Offline Rickmeister

Senior Devvie


Medals: 9
Projects: 1
Exp: 15 years


Don't eat yellow snow!


« Posted 2005-07-12 01:28:14 »

I'm having a hard time getting my soundengine to work.
I've recently decided to use LWJGL instead of JOAL+JOGL+JInput in my project but now I can't get even the most simple OpenAL implementation to work. I've had some experience dabbling with this library in C and with JOAL, but this is the first go with LWJGL. This is what happends when I try to run the "Lesson1" code found at lwjgl.org:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
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 Lesson1.loadALData(Lesson1.java:105)
        at Lesson1.execute(Lesson1.java:162)
        at Lesson1.main(Lesson1.java:204)
Exception in thread "main" java.lang.NullPointerException
        at Lesson1.loadALData(Lesson1.java:106)
        at Lesson1.execute(Lesson1.java:162)
        at Lesson1.main(Lesson1.java:204)


Running my own code inside Eclipse gives this output.

1  
2  
3  
java.lang.NullPointerException
   at org.lwjgl.util.WaveData.create(WaveData.java:93)
   at Main.main(Main.java:71)


I've tried to read in the file as a byte array and pass that to WaveData.create but that just gives me a bunch of other exceptions. What could be wrong?? Could it possibly be something inside my own code??? I find that unlikely since even the "official" examples fails.

Besides this problem, I think it's great to work with LWJGL and I really like the idea of only leaning against one set of javabindings/API/lib/Whatever, wich makes it a hell of a lot easier to distribute the game when, and if, it ever gets done.

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #1 - Posted 2005-07-12 05:57:35 »

try looking in org.lwjgl.test.openal.* for some examples.
All of the exceptions you have posted, are "user errors"

Offline Rickmeister

Senior Devvie


Medals: 9
Projects: 1
Exp: 15 years


Don't eat yellow snow!


« Reply #2 - Posted 2005-07-12 16:05:52 »

Hmm.. I took the lazy route when I installed LWJGL and just stuffed it into my JRE's lib/ext/ folder. After a complete reinstall of JDK6 I added the lwjgl jars as "external jars" inside eclipse.. Now it works.. A fine example of what a few hours of sleep is worth Cheesy

So, now it not just good looking*, it sounds well too..

*beauty is in the eye of the beholder, isn't it so?? My "coder graphics" are stunning
Pages: [1]
  ignore  |  Print  
 
 

 
DesertCoockie (52 views)
2018-05-13 18:23:11

nelsongames (83 views)
2018-04-24 18:15:36

nelsongames (74 views)
2018-04-24 18:14:32

ivj94 (759 views)
2018-03-24 14:47:39

ivj94 (87 views)
2018-03-24 14:46:31

ivj94 (643 views)
2018-03-24 14:43:53

Solater (102 views)
2018-03-17 05:04:08

nelsongames (184 views)
2018-03-05 17:56:34

Gornova (426 views)
2018-03-02 22:15:33

buddyBro (1086 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
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!