PDA

View Full Version : OpenAL Contexts


Orbz
11-30-2005, 04:11 AM
I am just messing about with some of the sample OAL code, It seems very straightforward, except for the contexts.
What exactly are they? whats the best way to use them?
Cheers
Orb

SpreeTree
11-30-2005, 04:57 AM
A context is nothing more than a handle to the device you are attempting to use. The context is used as a bridge to allow OpenAL to pass your sound calls to the relevant device and hardware.

Contexts are not really 'used' as such. Once you create a context (most normal applications only need the one), and set it as the current context (using alcMakeContextCurrent) then you no longer need to worry about it, until it comes time to delete it.

You can switch between contexts (if you have used OpenGL contexts, you should have an understanding of this), but with AL, you probably won't need to.

Contexts are not something that are usually covered in depth, as they are usually used in limited ways, but its always nice to understand what you are doing.

Spree

Orbz
11-30-2005, 06:49 AM
So its not a way to handle multiple environments? in EAX ?