Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

jmoses

OpenAL max ammount of sounds???

This topic is 5612 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

OK, I''m using OpenAL for sound in my game and every sound file loaded after my 32nd doesn''t load, and the file path is correct, if i switch the order they load in then the the nonworking ones will now work and the working ones wont, so there must be a limit to how many it can load or something //So here is my struct struct JSOUND { char* buffer; ALenum formatBuffer; ALsizei freqBuffer; long bufferLen; ALboolean loop; unsigned int source; unsigned int sampleSet; ALfloat sourcePos[3]; ALfloat sourceVel[3]; }; // and here is how i call it #define S_MAXSOUNDS 37 JSOUND sound[S_MAXSOUNDS]; Anyone have any ideas of how I can fix it... and is there anything I dont need in this structure that I have in there?

Share this post


Link to post
Share on other sites
Advertisement
Yes, there are a finite number of sounds (buffers and sources) that can be loaded. But why in the world do you need 32 different sounds effects?

Share this post


Link to post
Share on other sites
Well there is no "Sound Forum" So OpenAL fit best in OpenGL I guess, unless you have a better idea of where this post should have gone...

Well how do I get around the limit of 32 sound effect?

And The answer is simple, I''d like to have something more like 60 or 70 sounds, I''m writing a full out game and 3d engine, Quake 3 uses over 200+ sounds, maybe even 300 at a time
(And yes I am aware of memory, each sound is usually under 1 second) like footStep1.wav, footStep2.wav, footStep3.wav, bloodSplat1.wav, bloodSplat2.wav, bloodSplat3.wav....

Share this post


Link to post
Share on other sites
given most sound cards only hardware mix 32 channels anyways, playing 300 at a time would need software mixing anyways... btw, i doubt Q3 players 300 AT ONCE, hell, i doubt the human ear could work out 300 sounds at once without it sounding like a mess, it might have alot in memory and then rebind the buffers as it needs to play a different sound effect.

Share this post


Link to post
Share on other sites
Oh thats not what I mean, and I never said I wanted to play more than 32 sounds at once nor does Quake 3 play 300 sounds at once, I just said use - meaning it can load that many, deal with that many, handle that many, of course I dont want to play that many sounds but would I would like is a simple answer of how to do it, and if you dont know just don''t respond, you don''t have to bust my balls about if I posted this in the wrong forum in your opinion or telling me that Quake can''t have 300+ sounds ''cause it can :-)

Thank You.

Share this post


Link to post
Share on other sites
-And. You shouldn''t load all your sounds into the Sound Buffers at startup. You should (on each frame) test what sounds can be heard. -And then load that sound into an avalible Sound Buffer.

Remember the number of Sound Buffers vary from each SoundCard. -My card can''t take more than 16 voices.





-----------------------------
AM

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!