Audio‎ > ‎Audio API‎ > ‎OpenAL‎ > ‎

Alc

To start using openal one use to ALC (Audio Library Context) functions to create a device and context.

Enumerate
To learn what devices exist and can be opened one can use the extension Enumeration or Enumerate All. Extensions can be checked with alcIsExtensionPresent(*, *szName). It takes the name of the extension as a string and return AL_TRUE if the extension is present.

ALC_ENUMERATION_EXT
If this extension exist one can use alcGetString() to get all the devices (ALC_DEVICE_SPECIFIER) or the default device name (ALC_DEFAULT_DEVICE_SPECIFIER).


Startup
alcOpenDevice
To open the sound device call alcOpenDevice() and send in the name of the device to open. Use NULL to open the preferred device.

alcCreateContext
Create a audio context on a device with any optional parameters.

alcMakeContextCurrent
Make a audio context the current one so OpenAl knows what all the following function calls refer to.

Shutdown
alcDestroyContext
Use to destroy a context. Make sure the context is not current by calling alcMakeContextCurrent(NULL) before calling this.

alcCloseDevice
Use to destroy the device.
Comments