LWJGL
May 17, 2012, 03:13:17 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: locating audio files  (Read 3560 times)
Daroepfin
Newbie
*
Posts: 3


« on: December 23, 2005, 22:23:08 »

The WaveData class, when instanciated, looks for audio relative to the classpath, and that's kinda lame... I want to make it look 'absolutely', or relative to the working directory. I tried feeding it an absolute path and it didn't work.

Anybody have some advice?

Cheers
Jeff
Logged
oNyx
Talks Too Much
***
Posts: 177


弾幕


« Reply #1 on: December 24, 2005, 09:00:46 »

Relative to the classpath and relative to the working directory is the same (the former is a superset of the latter).

Well, use leading slashes (like "/sfx/blam.wav") for making it relative from the root of the classpath.
Logged

Daroepfin
Newbie
*
Posts: 3


« Reply #2 on: December 24, 2005, 19:28:25 »

Yeah, the workaround is easy, just not very elegant since netbeans has a weird place for putting my class files, which I feel I shouldn't need to worry about. I set it up to use a specific working directory, but LWJGL doesn't use that.

Oh, and so I don't the working directory is in the classpath necessarily...

It would be nice if WaveData took a location relative to the working directory, or if it could take an absolute address, or if it took a File as input.

~Jeff
Logged
oNyx
Talks Too Much
***
Posts: 177


弾幕


« Reply #3 on: December 25, 2005, 02:02:35 »

Its not a workaround. Its the proper way to do it.

Using files or absolute pathes would be an ugly hack, which would break outside of your building system. Dont do that.

Just add the resouce dir to the classpath (for the run bit) and use pathes with leading slashes. Thats all.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!