Show Posts
|
|
Pages: [1]
|
|
1
|
Java Game APIs & Engines / Java Sound & OpenAL / Endianness in wav files
|
on: 2005-09-30 15:45:43
|
Hello again. I just was wondering why the endianness thing has not been fixed in JOAL library. this is causing a lot of nagging to MacOS users given that wav are little endian. The code that swpalmer posted in the link below fix the problem, but... why this patch has not been considered for the newer versions? this code dates back to nov 2004... almost a year ago. I had to recompile the src and create the libraries again... which is not very nice thing to do, giving that could be already in the code. http://192.18.37.44/forums/index.php?topic=6706.0Thanks to all
|
|
|
|
|
2
|
Java Game APIs & Engines / Java Sound & OpenAL / Re: Bug in Mac OS X version: flipped bytes
|
on: 2005-09-30 15:40:31
|
|
Yes, it's perfect! thanks swpalmer!!
But, why is this not actually in a new version?? I cannot understand why this issue still isn't fixed in the new versions, given that this post dates back to november 2004!! (almost a year ago).
Actually, I will put a new post regarding this... for anyone that has that problem. Thanks again
|
|
|
|
|
4
|
Java Game APIs & Engines / Java Sound & OpenAL / OGG loading
|
on: 2005-09-30 11:19:38
|
Hi again! Well, I am just wondering how should one use the OGG files... that is, I only see a load/unload WAV utility in Alut Class... I hope this is a very trivial stuff.... but, please if you know tell me - or post some code  Thanks to you all
|
|
|
|
|
8
|
Java Game APIs & Engines / Java Sound & OpenAL / that ORIENTATION thing
|
on: 2005-09-28 20:14:13
|
|
hi there!
here comes a serious one... thee lines of code may be familiar to all of you...
al.alSourcefv(sources[selected_buffer].getSource(), AL.AL_POSITION, listenerPos); al.alSourcefv(sources[selected_buffer].getSource(), AL.AL_VELOCITY, listenerVel);
they are in the tutorials. But curiously, while trying to do the following:
al.alSourcefv(sources[selected_buffer].getSource(), AL.AL_ORIENTATION, listenerOri);
I can't get a sound. The file is not loaded. Is not casual that the orientation is not set in the tutorials?? It doesn't seem to work in the same way that the others do!
Btw, somebody could explain me what does the following mean? AL_ORIENTATION . Type: ALfv6 (at/up) Range: N/A
Please help with this... so strange a thing! Peace and joal to you all.
Ps. of course i am using the 3 and 6-float vector that come in the sample codes. Tricky!
|
|
|
|
|
10
|
Java Game APIs & Engines / Java Sound & OpenAL / That MUTE thing
|
on: 2005-09-28 18:49:07
|
|
HI there, it's me again.
I am just wondering if you know if there is a way to make "mute" and "unmute" the sounds.... Like if you have the typical button of a speaker, and when you click on it it mutes, and when you click again the sound keeps the same as if it was before -- just that didnt reach the speakers. I'm sure you know...
Well, just asking about what ways are recommended to do that: that does not seem to be that easy!
Thank you very much
|
|
|
|
|
11
|
Java Game APIs & Engines / Java Sound & OpenAL / Re: About 16 sounds limitation, buffers vs sources
|
on: 2005-09-28 15:47:12
|
|
Incredible.... look at this:
Max Sources: 102400 Max Buffers: 102400
// -- al = ALFactory.getAL(); ALut.alutInit(); al.alGetError();
int[] address = new int[1]; int i; for (i = 0; i < 102400; i++) { al.alGenSources(1,address); } System.out.println("Max Sources: " + i); for (i = 0; i < 102400; i++) { al.alGenBuffers(1,address); } System.out.println("Max Buffers: " + i);
|
|
|
|
|
12
|
Java Game APIs & Engines / Java Sound & OpenAL / Re: About 16 sounds limitation, buffers vs sources
|
on: 2005-09-28 15:29:34
|
Actually - and surprisingly though - , my approach is working fine, so I can hear at the same time a lot of guns (the infamous sound from the tutorials  ) Each time a sound is loaded both in the buffer and in the source... circulating in a buffer of 17, and beginning again dispatching the first one that was used, and creating the new one there. OK, it looks bad... but it works. At least in my computer  Any suggestions, improvements or nagging welcome... Thanks to all!
|
|
|
|
|
13
|
Java Game APIs & Engines / Java Sound & OpenAL / Re: About 16 sounds limitation, buffers vs sources
|
on: 2005-09-28 14:41:21
|
Many thanks to both. Apparently, my implementation is doing a stupid kind of thing: - Array of buffers [16] - Array of sources [16] - An undefined number of source files (this implementation is independent from that, because there are only 16 at a time). - Make correspond source with buffer. this way, when we want to load a sound, we load the buffer and then load the source. If there was an existing buffer/source; then stop the sound, delete previous buffer/source, and gen a new buffer with the new sound file, gen a new source, bind them and play. Well, it does work... but reading what you said, it seems to be kind of nonsensical thing with the buffers... isn't it? Should it be just terms of performance or do you think this can issue another kind of errors? (Bear in mind that, if a sound is requested twice(or n times), there will be two (or n) buffers loaded with the same sound... what seems to be possible anyway, since this is working - on the small, so far)
Thank you very much for your answers, you are saving my day please continue doing it 
|
|
|
|
|
14
|
Java Game APIs & Engines / Java Sound & OpenAL / Re: About 16 sounds limitation, buffers vs sources
|
on: 2005-09-28 14:02:04
|
Nice! Thank you very much for your answer! But that is dependent from the sound card you are using, isn't it? Which one is it, btw? As you may imagine I am coding a game to use in the net. Since there are battles and stuff, it is likely that will be maybe 100 sounds (actually i dont know, it will depend on another people rather than me  and well, if I have more sound files than buffers then I have to implement a circulating algorithm for the buffers... which is the thing I have done now (circulating through an array of 16 buffers, and saving like from 0-2 for the background sounds, from 3-6 to other looped sounds, etc.). And it works, but with some limitations. i have to admit it's not nice at all to have to deal with that algorithm... Anyway it seems to be needed to circulate through the sounds... isn't it? do you think of another (better) way to do that? Thank you very much
|
|
|
|
|
16
|
Java Game APIs & Engines / Java Sound & OpenAL / About 16 sounds limitation, buffers vs sources
|
on: 2005-09-28 11:14:04
|
|
Hi! Hello everybody, this is my very first post here in JOAL.
I happened to have my thinkings about that limitation problem. Before I read a post before about the 16 sounds limitation, I was thinking of a dynamic or simulated dynamic way of loading sounds.
After I read that nice post, my first question is: - Is the limitation on the number of sources or in the number of buffers?
As in that post, I have to deal with many more than 16 sounds - but i would like to have the game compatible with any sound card, and I dont think I'll need more than 16 sounds at the same time. My idea is to implement some kind of replacing algorithm, taking into consideration the PRIORITIES of the sounds (i.e. I should not replace the Background sound, for example). But then, I found myself unable to fully understand the next question...
- how should I manage a buffer, that is currently connected to a source (either playing or stopped) to load another sound on it, then link the source to the buffer and play the sound after? What happens with the data that was in the buffer and in the source before?
- I see in the other post that it is recommended to load ALL SOUNDS on the buffers, but... if there are kind of 100 sounds, may it work?
Even if i have went through the tutorials and played with JOAL a fair bit, it may happen that I am confused about the entities in JOAL... please, could somebody help me? Thank you very much!
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|