Jump to content
  • Advertisement
Sign in to follow this  
Seoushi

using ogg streams with multiple sources

This topic is 4138 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

So I finally have been messing with openal and ogg and I got a simple ogg stream working along with loading a whole file in a buffer. Now I want to be able to play the same stream multiple times (gun shots, walking noises, etc). The problem with streams is since the whole file isn't loaded in memory I would basically have to have 2 buffers for each noise I want to play at the same time. Is this a bad way to go? Should I just put short sound files fully in memory and not stream them? How many buffers can I create on a typical sound card, or does it not matter? I'm just looking a way on how to efficiently play multiple sounds at once. If buffers don't matter I will make everything a stream but I have a feeling they do. If buffers do matter then only long speaking parts and music would be streams.

Share this post


Link to post
Share on other sites
Advertisement
I personally use streaming for any music (background) and load actual sound clips like gunshots and that stuff into buffers (then into OpenAL when they're needed). This way you can play the same sound multiple times and stream the music.

Share this post


Link to post
Share on other sites
thanks, thats what I was thinking but some sound effects even though short seem to take up quite a bit of memory. I'm still curious how many buffers openal can handle and with what kind of hardware, might have to do some research.

Share this post


Link to post
Share on other sites
I'm pretty certain there is no limit on the amount of 'buffers' you can allocate (within the limits of sanity, handles and memory ofcourse), it's the number of sound sources which can vary per hardware/software implimentation.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!