i read the joal tutorials, and i have a problem.The method alutLoadWAVFile load the whole wave file? What if i have 9 songs to play depending on players position, so i have to be able to change music fast.should i load 360mbyte wave files to the memory? Or loading in runtime, isn't to expensive in performance (blocking, etc.)

I dont know the actual ins and outs of OpenAL yet, but i know you can stream data with it...You should try to stream your data, this way, you wont have the entire song wasting memory, and you wont have the huge long delay of sending the data to the memory by the bus in the first place...

Basically, streaming allows you send small amounts of data to OpenAL to load at a time...Its like streaming from the internet and playing it back while its downloading at the same time.

You send a small buffer filled with a small part of the music to OpenAL to play, once that has *almost* finished, you upload the next part...And if your clever enough, you can remove the data from the buffer that has already been played. But im not sure how performant that will be...

Thats the gist of it...I dont know much about how to do it, all I know is that it can be done.

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