LWJGL
May 17, 2012, 03:13:17
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
LWJGL 2.8.3 released!
Home
Help
Search
Login
Register
LWJGL
>
Programming
>
OpenAL
>
locating audio files
Pages: [
1
]
« previous
next »
Print
Author
Topic: locating audio files (Read 3560 times)
Daroepfin
Newbie
Posts: 3
locating audio files
«
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
弾幕
locating audio files
«
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
ze blog
☆
eee games
Daroepfin
Newbie
Posts: 3
locating audio files
«
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
弾幕
locating audio files
«
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
ze blog
☆
eee games
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Programming
-----------------------------
=> Lightweight Java Library Game Development
=> LWJGL Documentation
=> Bug Reports / RFE
=> OpenGL
=> OpenAL
=> General Java Game Development
-----------------------------
Archive
-----------------------------
=> Resolved Bugs/RFE
=> DirectX
=> DevIL
=> FMOD
Loading...