Class ALBase
This is a base class for OpenAL APIs that are using DllImport and want to resolve different dll names on different platforms.
Inheritance
ALBase
Inherited Members
Namespace: OpenTK.Audio.OpenAL
Assembly: OpenTK.Audio.OpenAL.dll
Syntax
public abstract class ALBase
Methods
LoadDelegate<TDelegate>(string)
Calls alGetProcAddress and converts the resulting pointer into a delegate.
Declaration
protected static TDelegate LoadDelegate<TDelegate>(string name) where TDelegate : Delegate
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the AL proc. |
Returns
Type | Description |
---|---|
TDelegate | The created delegate. |
Type Parameters
Name | Description |
---|---|
TDelegate | The delegate type to create. |
RegisterOpenALResolver()
This needs to be called before trying to use any OpenAL functions. This should be done in the static constructor of any class that DllImports OpenAL functions.
Declaration
public static void RegisterOpenALResolver()