Skip to main content

OpenAL

Go Search
Home
ALchemy
Beta - Audigy [CLOSED]
Beta - Linux
Beta - Windows
Developer
E-MU
MarCom
OpenAL
Open Source
PR
  
Creative Labs: Connect > OpenAL > OpenAL > Context, buffer and source limitations  

OpenAL

Modify settings and columns
Note : This discussion forum has been CLOSED.

For questions about developing software using OpenAL please subscribe to the 'OpenAL' mailing list at http://opensource.creative.com/mailman/listinfo/openal

For questions about creating a custom OpenAL library, please subscribe to the 'OpenAL-Devel' mailing list at http://opensource.creative.com/mailman/listinfo/openal-devel
  
View: 
Post
Started: 7/28/2008 5:05 PM
Context, buffer and source limitations?

Hey

Is there hardware limitations on the number of contexts, buffers and sources that you can have simultaneously?

If yes, how can you detect/know the maximum number of each?

Thanks
Posted: 7/28/2008 7:30 PM

With an open device, you can query: alcGetIntegerv(device, ALC_MONO_SOURCES, 1, &val); to get the number of available mono sources (and ALC_STEREO_SOURCES for stereo). Note though that these are only hints.. you may be able to get more or less depending on the implementation and state of the system (eg. for a hardware driver, if a background app takes a hardware voice, you'll get one less to work with until its released; a software implementation wouldn't have this limitation).

Generally, though, you'd be able to allocate that many sources, but you may not be able to *use* them simultaniously for aforementioned reasons. But considering hardware can do from 16 up to 128 or 256 voices, if you're using that many at one time, output will be too loud anyway.

Buffers you can't query the amount of. But I think in all existing implementations, you can create virtually unlimitted buffers.

For contexts, I think most implementations only let you safely create one. OpenAL Soft is probably the only one that lets you have multiple contexts, but currently requires one open device for each context.