Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (498)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  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.0

Thanks 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
3  Java Game APIs & Engines / Java Sound & OpenAL / Re: OGG loading on: 2005-09-30 13:26:59
I see... sorry for that
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 Smiley

Thanks to you all
5  Java Game APIs & Engines / Java Sound & OpenAL / Re: That MUTE thing on: 2005-09-29 14:01:12
Clearly one never may work 11 hours with no stop... of course!
I didn't think of the volume control !!

thanks tom
6  Java Game APIs & Engines / Java Sound & OpenAL / Re: About 16 sounds limitation, buffers vs sources on: 2005-09-29 09:45:57
Sure it makes more sense.

But I have already implemented the other version, and it is working fine...
7  Java Game APIs & Engines / Java Sound & OpenAL / Re: that ORIENTATION thing on: 2005-09-29 09:42:08
Thanks.

Anyway, that is what I am doing (which actually came in the tutorials).
I really have no clue about this.

Cheers
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!
9  Java Game APIs & Engines / Java Sound & OpenAL / Re: That MUTE thing on: 2005-09-28 19:10:29
well... at this time of the evening, one is not up for thinking too much...

I already set it up with the

alSourcePause
alSourcePlay

methods... shame on me!!
Thanks anyway and apologies for the nagging....
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 Wink  )
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 Smiley
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 Smiley please continue doing it  Tongue

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 Smiley 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

15  Java Game APIs & Engines / Java Sound & OpenAL / Re: About 16 sounds limitation, buffers vs sources on: 2005-09-28 11:42:44
Here is the other post about the 16 sounds limitation, sorry. It may be handy to have the link:

http://192.18.37.44/forums/index.php?topic=9968.0

... thanks tom for the "recommendation" for how to use buffers and sources in a real game... but, does that mean ALL the sounds have to be loaded at startup in the buffers? ALL are a lot of sounds... Smiley
Thanks again
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!
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (18 views)
2014-04-15 18:08:23

BurntPizza (15 views)
2014-04-15 03:46:01

UprightPath (28 views)
2014-04-14 17:39:50

UprightPath (13 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (54 views)
2014-04-10 04:04:31

BurntPizza (111 views)
2014-04-08 23:06:04

tom_mai78101 (212 views)
2014-04-05 13:34:39

trollwarrior1 (181 views)
2014-04-04 12:06:45

CJLetsGame (187 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!