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 (603)
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  
  JOAL and WebStart problem  (Read 6764 times)
0 Members and 1 Guest are viewing this topic.
Offline shawnkendall

Senior Devvie





« Posted 2006-07-20 23:07:34 »

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!

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline shawnkendall

Senior Devvie





« Reply #1 - Posted 2006-07-21 00:10:26 »

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 :-)

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline shawnkendall

Senior Devvie





« Reply #2 - Posted 2006-07-21 00:23:15 »

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 :-)

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline shawnkendall

Senior Devvie





« Reply #3 - Posted 2006-07-21 00:40:52 »

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 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? Smiley

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!

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #4 - Posted 2006-07-21 08:01:04 »

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?
Offline shawnkendall

Senior Devvie





« Reply #5 - Posted 2006-07-21 16:12:57 »

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

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline shawnkendall

Senior Devvie





« Reply #6 - Posted 2006-07-21 22:01:21 »

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...

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #7 - Posted 2006-07-21 23:03:43 »

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.
Offline shawnkendall

Senior Devvie





« Reply #8 - Posted 2006-07-21 23:13:17 »

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. Smiley

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 Smiley

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!

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline bahuman

Junior Devvie





« Reply #9 - Posted 2006-07-21 23:17:24 »

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?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline shawnkendall

Senior Devvie





« Reply #10 - Posted 2006-07-21 23:19:17 »

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().

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #11 - Posted 2006-07-21 23:45:20 »

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?
Offline shawnkendall

Senior Devvie





« Reply #12 - Posted 2006-07-22 00:31:33 »

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.

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline shawnkendall

Senior Devvie





« Reply #13 - Posted 2006-07-22 01:33:57 »

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.

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #14 - Posted 2006-07-22 17:34:02 »

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.
Offline shawnkendall

Senior Devvie





« Reply #15 - Posted 2006-07-22 23:58:34 »

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?...

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #16 - Posted 2006-07-23 06:19:19 »

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.
Offline shawnkendall

Senior Devvie





« Reply #17 - Posted 2006-07-24 21:20:03 »

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 :-(

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline kcr

Senior Newbie





« Reply #18 - Posted 2006-07-24 23:34:12 »

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
Offline kcr

Senior Newbie





« Reply #19 - Posted 2006-07-24 23:39:02 »

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
Offline shawnkendall

Senior Devvie





« Reply #20 - Posted 2006-07-25 00:55:15 »

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

This is a dupe of my response back in the Java3d desktop forums:
...
Ahh yes, as per the forum Smiley this is _Windows_ only so far.
That's is far as I got, since it didn't work there I stopped.

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #21 - Posted 2006-07-25 11:05:31 »

Shawn, could you please provide a version of your test app that does nothing with Java 3D but puts some Swing / AWT components in a window so we can see whether the problem seems to be related to the core GUI toolkit or Java 3D somehow?

Could you provide source code for your test case?
Offline shawnkendall

Senior Devvie





« Reply #22 - Posted 2006-07-25 11:43:44 »

Shawn, could you please provide a version of your test app that does nothing with Java 3D but puts some Swing / AWT components in a window so we can see whether the problem seems to be related to the core GUI toolkit or Java 3D somehow?

Could you provide source code for your test case?

Yes and yes, however...
In the full engine app online right now, it starts up with a Swing splash screen and the sound keeps playing.  Only when the next framed window is shown and the Java3D has been init-ed does it happen.
I will put the modded HelloUniverse and our SoundManager code up this morning.  (Although you need is all in the jars and DJ will decompile it just fine - http://members.fortunecity.com/neshkov/dj.html)

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline shawnkendall

Senior Devvie





« Reply #23 - Posted 2006-07-25 14:56:04 »

OK can email one of you the source code for that example app, just let me know who.
Thanks

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #24 - Posted 2006-07-25 15:26:06 »

You can send it to me. I'll PM you my email address.
Offline shawnkendall

Senior Devvie





« Reply #25 - Posted 2006-07-26 17:42:14 »

Discussion is moving to:
Cosmic Birdie Tech Demo Audio Test
http://www.java-gaming.org/forums/index.php?topic=14480.msg115004#msg115004

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
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 (33 views)
2014-12-15 09:26:44

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

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

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

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

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

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

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

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

toopeicgaming1999 (32 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!