Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (575)
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  
  net.java.games.joal.ALException: Error opening default OpenAL device  (Read 2711 times)
0 Members and 1 Guest are viewing this topic.
Offline GregBz

Junior Newbie





« Posted 2007-08-22 22:16:22 »

Though I can run the Point Sound demo from webstart.  I get the following error when I try it in code with Idea  IDE  and from a command line .


net.java.games.joal.ALException: Error opening default OpenAL device
   at net.java.games.joal.util.ALut.alutInit(ALut.java:71)
   at org.jdesktop.j3d.audioengines.joal.JOALMixer.initialize(JOALMixer.java:600)



I have downloaded all the jars and put the dlls in the application paths, I have no unsatisfied link errors.  I have searched the web High and Low for a post with the same problem.  What am I missing.


Jars:
gluegen-rt.jar
j3dcore.jar
j3dutils.jar
joal.jar
joalmixer.jar
vecmath.jar

Dlls:
gluegen-rt.dll
j3dcore-d3d.dll
j3dcore-olg.dll
j3dcore-ogl-cg.dll
j3dcore-ogl-chk.dll
joal_native.dll
OpenAL32.dll
wrap_oal.dll



Thanks in advance
Greg


Offline Ultraq

Junior Duke




That's what she said


« Reply #1 - Posted 2007-08-23 07:21:32 »

You've got all the JARs and DLLs needed to start a JOAL app, so UnsatisfiedLinkErrors are the least of your worries.  From the stack trace you've given, it seems the problem is internal somehow.  The code in ALut.java surrounding line 71 is:

68: String deviceName = null;
69: ALCdevice d = alc.alcOpenDevice(deviceName);
70: if (d == null) {
71:   throw new ALException("Error opening default OpenAL device");
72: }

Considering this works in webstart but not Idea, I'd suspect that somehow webstart is finding an OpenAL sound device, whereas the code when run from Idea isn't.

Do you have the latest drivers installed for your soundcard, and do they drivers include OpenAL drivers?  My guess is that webstart is using the OpenAL software device provided by wrap_oal.dll, whereas when running it from Idea it tries to find OpenAL drivers in your Windows/System32 directory and fails to fallback to the software device.
If your sound drivers don't include OpenAL, you can install an OpenAL software device (much like that in the webstart version of the sound demos) by downloading the Windows installer from www.openal.org

Failing all that, could you see if any OpenAL devices are listed by the following code:

ALC alc = ALFactory.getALC();
System.out.println("Available devices: " + alc.alcGetDeviceSpecifiers(null, ALC_DEVICE_SPECIFIERS));


Ultraq's Final MooCow
Bits and Pieces by Emanuel Rabina
Offline GregBz

Junior Newbie





« Reply #2 - Posted 2007-08-23 09:30:05 »

OK..  Fixed it
For the record
1) Thank you Ultraq for the posting.  It set me on the correct vector. The example using the api ended up been this.

        ALC alc = ALFactory.getALC();
       System.out.println("Available devices: " + alc.alcGetString(null, ALC.ALC_DEFAULT_DEVICE_SPECIFIER));

2) Though the there were no unsatisfied link errors.  The following dll's "OpenAL32.dll, wrap_oal.dll" needed to be in a published native class path. It was just not enough to be discovered and loaded by the JVM.

Thanks Again
Greg

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.

Longarmx (34 views)
2014-10-17 03:59:02

Norakomi (25 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (26 views)
2014-10-15 16:18:58

TehJavaDev (50 views)
2014-10-14 00:39:48

TehJavaDev (50 views)
2014-10-14 00:35:47

TehJavaDev (40 views)
2014-10-14 00:32:37

BurntPizza (63 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (74 views)
2014-10-11 22:30:10
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!