LWJGL Forum

Archive => FMOD => Topic started by: Owen Butler on July 10, 2007, 13:54:01

Title: java.lang.UnsatisfiedLinkError: nFSOUND_Stream_Open, OSX Intel, lwjgl 1.1
Post by: Owen Butler on July 10, 2007, 13:54:01
Hi,

I'm getting the following error when trying to call

FSound.FSOUND_Stream_Open(data, FSound.FSOUND_LOADMEMORY)

java.lang.UnsatisfiedLinkError: nFSOUND_Stream_Open

Here's the full stack trace.

java.lang.UnsatisfiedLinkError: nFSOUND_Stream_Open
at org.lwjgl.fmod3.FSound.nFSOUND_Stream_Open(Native Method)
at org.lwjgl.fmod3.FSound.FSOUND_Stream_Open(FSound.java:2103)
at org.jgameengine.audio.fmod.FMODStreamHandle.loadStreamFromFile(FMODStreamHandle.java:57)
at org.jgameengine.audio.fmod.FMODAudioManager.loadMusicInMemory(FMODAudioManager.java:84)
at org.jgameengine.testgame.initialiser.TestGameClientInitialiser.initialiseEngine(TestGameClientInitialiser.java:33)
at org.jgameengine.engine.Engine.initEngine(Engine.java:267)
at org.jgameengine.launcher.FirstLauncher.main(FirstLauncher.java:47)


I'm fairly sure it's not an obvious error like I don't have the native library path set.  The reason I'm sure of this is that I've successfully called

FSound.FSOUND_Init(getSampleRate(), getNumberOfChannels(), 0)

And:

FSound.FSOUND_Update();

Here's the bit I'm adding to the command line to set the native library path:

-Djava.library.path=/Users/owenbutler/lib/lwjgl-1.1/native/macosx:/Users/owenbutler/lib/lwjgl_optional-1.1/native/macosx

I'm at a bit of a loss.  I've pretty much just copy and pasted example code from this example here:

http://svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/src/java/org/lwjgl/test/fmod3/StreamPlayerMemory.java?view=markup

Any ideas?
Title: Re: java.lang.UnsatisfiedLinkError: nFSOUND_Stream_Open, OSX Intel, lwjgl 1.1
Post by: Fool Running on July 10, 2007, 14:01:50
Unless it was changed, LWJGL doesn't come with the FMOD dll for licensing reasons since it isn't free software.
The only thing I can think of is that you don't have the FMOD dll. You need to go to the FMOD website and get the dll from there and add it to your path as well.

Hope that helps ;D
Title: Re: java.lang.UnsatisfiedLinkError: nFSOUND_Stream_Open, OSX Intel, lwjgl 1.1
Post by: Owen Butler on July 10, 2007, 14:06:10
Hi Fool Running,

From reading the thread here:

http://lwjgl.org/forum/index.php/topic,1898.0.html

I'm led to believe that you don't need to download a dll for OSX.  Seems that the OSX equivalent of a dll is included in the optional zip.  Specifically:

http://lwjgl.org/forum/index.php/topic,1898.msg11156.html#msg11156
Title: Re: java.lang.UnsatisfiedLinkError: nFSOUND_Stream_Open, OSX Intel, lwjgl 1.1
Post by: Matzon on July 10, 2007, 16:00:05
have you made sure to call FMOD.create(); before loading?
Title: Re: java.lang.UnsatisfiedLinkError: nFSOUND_Stream_Open, OSX Intel, lwjgl 1.1
Post by: Owen Butler on July 10, 2007, 21:29:57
Quote from: Matzon on July 10, 2007, 16:00:05
have you made sure to call FMOD.create(); before loading?

Hi Matzon,

I'm a complete fool!  I had a call to this, but I recently re-organized a few lines in my initialization code and the music start ended up before the audio init.  Thanks Matzon!