FSOUND_Sample_Load Filepath?

Started by kompliziert, May 24, 2007, 01:29:53

Previous topic - Next topic

kompliziert

Hello.

I'm trying to load and play a sample using fmod, which I tell to

      
FSoundSample mod = FSound.FSOUND_Sample_Load(FSound.FSOUND_FREE, "back.mp3", FSound.FSOUND_LOOP_OFF, 0, 0);
	    FSound.FSOUND_PlaySound(FSound.FSOUND_FREE, mod);


The Debugger stops at the second Line with a NullPointerException, probably because the file can't be found.

I'm using this inside an eclipse-rcp-application and wonder where the root of Filepath is in this context?
Putting the mp3 next to lwjgl.jar, the lwjgl-fmod3.jar or the dlls did not succeed, the root of the project also did not work! I even tried the bin-directory of the jre...

Any suggestions?

Greetings

Matzon

I am not sure where the relative path is - try doing an absolute first to confirm everything works - and then guess the eclipse path.
I do not recommend using mp3 though. Consider using ogg/vorbis instead

kompliziert

Thank you very very much!

I just returned from a very long day and can now enjoy a working background-music,
wondering why I not even thought about this most probable answer (elicpse dir) - it's so nice: thank you again!  ;D

Concerning an absolute path: I tried this before but must have missed the correct notation for windows driveletters and slashes
so if 'back.ogg' would lie on drive d: in the folder 'audio', which one would be correct in this context:

a) "D:audio\back.ogg"
b) "D:\audio\back.ogg"
c) "D:\\audio\back.ogg"

...I even read about four slashes somewhere, so

d) "D:\\\\audio\back.ogg"?

Perhaps slashes the other way round?

The 'ogg-advice' also hit very well which easily convinces me to say again: Thank you!

Matzon