JOAL and WebStart problem

Hi all,
So we have our sound system intergrated into our game now and eveything works fine HOWEVER…

When I set it up to web start, I get no sound but no errors…

I have run a couple of webstart JOAL demos (although I believe there were actually LWJGL)…

Anway, is anyone else having trouble, or rather does anyone have a working JOAL webstart demo that I can

  1. run and
  2. have a peek at the code.

I have no idea why it would work fine on the desktop and not in webstart (other than path issues, but as I said I can getting no errors from load OR JOAL initialization.

Thanks in advance for any help!

Ok, I’m betting this is misuse of ALut.alutLoadWAVFile, and not actually a web start problem.
I managed to get some errors out, I’ll post again once a try a few more things :slight_smile:

Nope, I’ve varified I am getting a data load/etc in the web start app, just no sounds.
That is on three different machines (although one does give a start up error related to JOAL and doesn’t init).

If there is any JOAL makers out there I can post the web start link although I’m not sure how much that will help :slight_smile:

Update…
So a friend of mine tried the web start link on a MS Vista beta 2 (5384), and it worked! of course J3D didn’t but that’s openGL related.
So this is a good mystery to me. No windows machine I have to test on (x64, x86, nvidia sound, other sound) worked, so naturally I would think it was a configuration error. But a thorough check could not find one, and then it worked on a fresh Vista system.

[MOD]- This has just been re-tested on that same computer but booted to WinXP and it failed as it has been (this system is a dual WinXP/Vista test system). So what gives, it works in VIsta but NOT WinXP on the same machine.
Then, one more test on another WinXP system worked first try - Creative Blaster X-fi.

The wierdest thing is that it works on my test machines if I run .bat/command-line just not from web start. But then at least two have worked with web start. ick :stuck_out_tongue:

Strange that other JOAL demos I tested work. (on WinXP).
So other peeps using JOAL in web start, what’s your secret? I did read some posts where people have packed more .dlls (openAL related) in with the jar for Windows systems…

Anyone? :slight_smile:

Please guys, don’t make me have to switch my support for net.java.games.* to LWJGL for sound (no offense to Cas/etc) in the last mile of this engine!

We haven’t yet properly bundled up JOAL for web starting – I am pretty sure that in order to do so we are going to need to add code to JOAL to dynamically find and load the OpenAL DLL / DSO. That having been said, if you already have OpenAL installed then JOAL should work via Java Web Start. Have you checked to see whether that’s the difference between your XP and Vista partitions?

Actually we’ve now done several more tests and basically if you don’t have the openAL driver installed you get a launch error as excepted on every system we tried, webstart or command-line launch.

The screwy part is if you install openAL (or already have it) then the launch goes fine, no init errors. Command-line has working sound, web start doesn’t in EVERY case EXCEPT on Vista (This is all testing on WindowsXP otherwise).

So the problem is that web start SEEMS to be getting the environment right because it produces no errors (I wish it did!) but never makes a sound. I thought at one point maybe it was security related (I was trying anything) but the kicker is that I can run Jake2 (I actually compared .jnlp’s just to see if any configuration was different) which s’posely uses JOAL. Short of decompiling Jake2 (!!!) to see what the heck they do at startup I’m at a loss what to try.

If there is a single other working JOAL web start demo I’d love to see the init code…

[mod] Thanks for the response BTW

Ok new info.
I moved the sound init to right at the very begining of my system start-up and it works there on web start. I would be cheering but once the game gets all loaded and ready to go, it’s just as before, no errors, no sounds.

So this soudns like a context bug no? Or miss use or something.
How about Java3D? Are there any known issues with Java3D (1.4.1 - latest web start link) with JOAL?

Thanks all

[mod] just FYI I went through and added a setting of the current context (to the original context that worked at start up) in all my update/play calls in our manager but still no sounds once in the game…

It does sound something like your OpenAL context is getting released behind your back or something, but I don’t think Java 3D does anything with sound devices any more. Have you tried making a tiny non-Java 3D JOAL app and tried launching it? I’m 99.9% sure Jake2 is using JOAL, and they haven’t reported any problems (but they don’t use Java 3D)…

You might want to email the Jake2 team at bytonic.de with questions or ask them to check this forum.

Actually I pulled down all the Jake2 stuff to have a look and tried several things. :slight_smile:

One thing to note is they are using version 1.0 so that’s no longer compatilbile with 1.1 (i.e. it blows up on MethodNotFound) since the addition of all the offset parameters in the JOAL methods. So that is one difference. Also they packed in the openal dll, which I also added to my jars, but no change.

I did take a look at Jake2’s init-ing and it’s basically the same as any example code out there, I mean openAL is simple to start up :slight_smile:

Of course, then there is that Vista thing. It all works in Vista. So Vista is handling it’s sound drivers “better”? that seems unlikely.

How about Swing or AWT? Something in there is killing the sound, but really killing since I added the context setting before my access calls.

Oh yeah and just once more, this is web start only, which makes it all the more frustrating since any of these ideas above all work fine command-line… :\ Why the heck would Java 1.5 webstart run differently/better on Vista, it’s the same web start!

this might be a really, REALLY stupid question, but then again, it might be stupid enough for you to overlook it?
Have you checked the sound levels? Maybe some library defaults the sound to zero/muted, and vista doesn’t do that?

Well like I said, I moved the sound to the very begining and that works. then my loading continues, and once the J3D window is up and the same sound is triggered, it’s gone.

Here is little update, I set the sound to loop continuously right from the start.
The app stops making sound the moment the main frame of the app is setVisible. This frame does not have a Java3D component in it, just normal Swing components, although I have init-ed just about everything since frame.setVisible(true) is the last thing that runs in the main().

I’m really at a loss to explain this behavior unless we drastically broke something between JOAL 1.0 and 1.1.

Do you have a small and self-contained web startable test case including source code which shows the problem?

The short answer is of course no, but I can put the link up for the current build and get you the complete source code if you like.

Here’s the link at least
http://www.imilabs.com/CosmicBirdie/Dist/cbWeb2.jnlp

I will look at doing a small app that makes this happen, I think I will just hack it into Java3D hello world to see if i can reproduce it outside of our engine.

OK!
I have a tiny little app showing the problem.
It’s HelloUniverse with the JOAL code from my engine put in.
Works command-line, gets zapped in web start.

How shall I deliver it?
I can set up the web start on my site, maybe zip it all up there as well…

Ok here is the little app, it still reads in the sound files from the asset lib from CB so if you have never run that it will take time dl-ing that first of course.

http://www.imilabs.com/CosmicBirdie/Dist/soundTest.jnlp

Depending on how quick it can launch on your system, you may only hear a pop before the sound stops.
[mod] I added a 3 sec sleep before the window gets made so you should hear the gun now at start-up.

Sorry, I thought you were going to produce a test case that didn’t involve Java 3D, only AWT components. My best guess at the moment is still that Java 3D’s audio system code is doing something that screws up JOAL.

Have you posted on the Java 3D forum on javadesktop.org? The Java 3D developers monitor that forum but I don’t think they do this one.

Yes actually I cross posted this forum from the begining here on JGO and over on the desktop/java3d forums.
Also, my Swing splash screen comes up just fine with sound, it’s only once Java3D gets going there is an issue, at least the test app I made is very small and that’s all it does.

So you as the JOAL rep send me over to the Java3D guys huh? But remember it works fine when NOT using web start. So Java3D guys will send me over to web start guys? And then, surprise! they will send me over to you guys! :wink: I’ve seen this trick before! (just teasing)

Maybe we can get everyone on the phone at once?..

The Java 3D team should know what’s going on with its use of sound or any audio devices and will perhaps have a workaround involving completely disabling Java 3D’s use of sound.

Ok thanks!
Been trying to get a rise outta them but no answer yet :frowning:

Shawn posted a pointer to this thread on the Java 3D thread, so I’ll weigh in. In the absence of an AudioDevice3DL2 object passed to the Java 3D PhysicalEnvironment object, Java 3D does not do anything with sound. There is a partially functional JavaSoundMixer audio device in com.sun.j3d.audioengines.javasound in the j3dutils jar, which is disabled unless the app explicitly enables it, either by constructing an instance of it, or by setting the j3d.audiodevice system property to the fully-qualified class and then using the Viewer.createAudioDevice() helper method.

Note that we have a developer who is working on JOALMixer, a JOAL-based implementation of Java 3D’s audio device, but it isn’t being used yet, and when available, it will be enabled in the same manner (explicitly or with a system property).

None of which helps solve Shawn’s problem, which may or may not be related to Java 3D.

– Kevin

Btw, I get the following exception when I try to run the example on the previous page.

com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://www.imilabs.com/CosmicBirdie/Dist/lib/linux/joal.jar

– Kevin