[openal] Is there a distinct difference between alcGetProcAddress and alGetProcAddress?

Chris Robinson chris.kcat at gmail.com
Thu Jul 29 03:24:58 EDT 2021

On Thu, 29 Jul 2021 08:57:57 +0300
Sean <s.tolstoyevski at gmail.com> wrote:

> Hello there,
> I know that ALC functions are all device specific. Each device
> supports different features, etc.
> However, when I examined the OpenAL-Soft source, I could not see any 
> difference between the working logic of these 2 functions.
> In which cases should we prefer ALC?
> In which situations might ALC be used?


The spec isn't very detailed on the matter, but I would've thought
alGetProcAddress would be used to get al* functions (which may or may
not be context-dependent), and alcGetProcAddress would be used to get
alc* functions (which may or may not be device-dependent).

However, I ran into some code that expected to get alc functions from
alGetProcAddress (or maybe the other way around? trying to get al
functions from alcGetProcAddress), so it just made sense to make them
the same. OpenAL Soft has no device- or context-specific functions, so
there's no real reason to have separate lists.

Note that on Windows with OpenAL Soft's router, the functions you get
are at least driver-specific and can't be used between devices from
different drivers (e.g. a function from alGetProcAddress on an OpenAL
Soft device context, or from alcGerProcAddress with an OpenAL Soft
device, can't be used with a Generic Software device or context).

More information about the openal mailing list