Class ALC
Alc = Audio Library Context.
Inherited Members
Namespace: OpenTK.Audio.OpenAL
Assembly: OpenTK.Audio.OpenAL.dll
Syntax
public class ALC : ALBase
Methods
CaptureCloseDevice(ALCaptureDevice)
This function closes the specified capture device.
Declaration
public static extern bool CaptureCloseDevice(ALCaptureDevice device)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to a capture device. |
Returns
Type | Description |
---|---|
bool | Returns True if the close operation was successful, False on failure. |
CaptureOpenDevice(string, int, ALFormat, int)
This function opens a capture device by name.
Declaration
public static extern ALCaptureDevice CaptureOpenDevice(string devicename, int frequency, ALFormat format, int buffersize)
Parameters
Type | Name | Description |
---|---|---|
string | devicename | A pointer to a device name string. |
int | frequency | The frequency that the buffer should be captured at. |
ALFormat | format | The requested capture buffer format. |
int | buffersize | The size of the capture buffer in samples, not bytes. |
Returns
Type | Description |
---|---|
ALCaptureDevice | Returns the capture device pointer, or Null on failure. |
CaptureOpenDevice(string, uint, ALFormat, int)
This function opens a capture device by name.
Declaration
public static extern ALCaptureDevice CaptureOpenDevice(string devicename, uint frequency, ALFormat format, int buffersize)
Parameters
Type | Name | Description |
---|---|---|
string | devicename | A pointer to a device name string. |
uint | frequency | The frequency that the buffer should be captured at. |
ALFormat | format | The requested capture buffer format. |
int | buffersize | The size of the capture buffer in samples, not bytes. |
Returns
Type | Description |
---|---|
ALCaptureDevice | Returns the capture device pointer, or Null on failure. |
CaptureSamples(ALCaptureDevice, ref byte, int)
This function completes a capture operation, and does not block.
Declaration
public static extern void CaptureSamples(ALCaptureDevice device, ref byte buffer, int samples)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to a capture device. |
byte | buffer | A pointer to a buffer, which must be large enough to accommodate the number of samples. |
int | samples | The number of samples to be retrieved. |
CaptureSamples(ALCaptureDevice, ref short, int)
This function completes a capture operation, and does not block.
Declaration
public static extern void CaptureSamples(ALCaptureDevice device, ref short buffer, int samples)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to a capture device. |
short | buffer | A pointer to a buffer, which must be large enough to accommodate the number of samples. |
int | samples | The number of samples to be retrieved. |
CaptureSamples(ALCaptureDevice, IntPtr, int)
This function completes a capture operation, and does not block.
Declaration
public static extern void CaptureSamples(ALCaptureDevice device, IntPtr buffer, int samples)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to a capture device. |
IntPtr | buffer | A pointer to a buffer, which must be large enough to accommodate the number of samples. |
int | samples | The number of samples to be retrieved. |
CaptureSamples(ALCaptureDevice, void*, int)
This function completes a capture operation, and does not block.
Declaration
public static extern void CaptureSamples(ALCaptureDevice device, void* buffer, int samples)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to a capture device. |
void* | buffer | A pointer to a buffer, which must be large enough to accommodate the number of samples. |
int | samples | The number of samples to be retrieved. |
CaptureSamples<T>(ALCaptureDevice, T[], int)
This function completes a capture operation, and does not block.
Declaration
public static void CaptureSamples<T>(ALCaptureDevice device, T[] buffer, int samples) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to a capture device. |
T[] | buffer | A buffer, which must be large enough to accommodate the number of samples. |
int | samples | The number of samples to be retrieved. |
Type Parameters
Name | Description |
---|---|
T | The buffer datatype. |
CaptureSamples<T>(ALCaptureDevice, ref T, int)
This function completes a capture operation, and does not block.
Declaration
public static void CaptureSamples<T>(ALCaptureDevice device, ref T buffer, int samples) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to a capture device. |
T | buffer | A reference to a buffer, which must be large enough to accommodate the number of samples. |
int | samples | The number of samples to be retrieved. |
Type Parameters
Name | Description |
---|---|
T | The buffer datatype. |
CaptureStart(ALCaptureDevice)
This function begins a capture operation.
Declaration
public static extern void CaptureStart(ALCaptureDevice device)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to a capture device. |
Remarks
alcCaptureStart will begin recording to an internal ring buffer of the size specified when opening the capture device. The application can then retrieve the number of samples currently available using the ALC_CAPTURE_SAPMPLES token with alcGetIntegerv. When the application determines that enough samples are available for processing, then it can obtain them with a call to alcCaptureSamples.
CaptureStop(ALCaptureDevice)
This function stops a capture operation.
Declaration
public static extern void CaptureStop(ALCaptureDevice device)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to a capture device. |
CloseDevice(ALDevice)
This function closes a device by name.
Declaration
public static extern bool CloseDevice(ALDevice device)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to an opened device. |
Returns
Type | Description |
---|---|
bool | True will be returned on success or False on failure. Closing a device will fail if the device contains any contexts or buffers. |
CreateContext(ALDevice, ALContextAttributes)
This function creates a context using a specified device.
Declaration
public static ALContext CreateContext(ALDevice device, ALContextAttributes attributes)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to a device. |
ALContextAttributes | attributes | The ALContext attributes to request. |
Returns
Type | Description |
---|---|
ALContext | Returns a pointer to the new context (NULL on failure). |
Remarks
The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.
CreateContext(ALDevice, int[])
This function creates a context using a specified device.
Declaration
public static extern ALContext CreateContext(ALDevice device, int[] attributeList)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to a device. |
int[] | attributeList | A zero terminated array of a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC. |
Returns
Type | Description |
---|---|
ALContext | Returns a pointer to the new context (NULL on failure). |
Remarks
The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.
CreateContext(ALDevice, ref int)
This function creates a context using a specified device.
Declaration
public static extern ALContext CreateContext(ALDevice device, ref int attributeList)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to a device. |
int | attributeList | A zero terminated array of a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC. |
Returns
Type | Description |
---|---|
ALContext | Returns a pointer to the new context (NULL on failure). |
Remarks
The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.
CreateContext(ALDevice, int*)
This function creates a context using a specified device.
Declaration
public static extern ALContext CreateContext(ALDevice device, int* attributeList)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to a device. |
int* | attributeList | A zero terminated array of a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC. |
Returns
Type | Description |
---|---|
ALContext | Returns a pointer to the new context (NULL on failure). |
Remarks
The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.
CreateContext(ALDevice, Span<int>)
This function creates a context using a specified device.
Declaration
public static ALContext CreateContext(ALDevice device, Span<int> attributeList)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to a device. |
Span<int> | attributeList | A zero terminated span of a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC. |
Returns
Type | Description |
---|---|
ALContext | Returns a pointer to the new context (NULL on failure). |
Remarks
The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.
DestroyContext(ALContext)
This function destroys a context.
Declaration
public static extern void DestroyContext(ALContext context)
Parameters
Type | Name | Description |
---|---|---|
ALContext | context | A pointer to the new context. |
GetAttributeArray(ALDevice)
Returns a list of attributes for the current context of the specified device.
Declaration
public static int[] GetAttributeArray(ALDevice device)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | The device to get attributes from. |
Returns
Type | Description |
---|---|
int[] | A list of attributes for the device. |
GetContextAttributes(ALDevice)
Returns a list of attributes for the current context of the specified device.
Declaration
public static ALContextAttributes GetContextAttributes(ALDevice device)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | The device to get attributes from. |
Returns
Type | Description |
---|---|
ALContextAttributes | A list of attributes for the device. |
GetContextsDevice(ALContext)
This function retrieves a context's device pointer.
Declaration
public static extern ALDevice GetContextsDevice(ALContext context)
Parameters
Type | Name | Description |
---|---|---|
ALContext | context | A pointer to a context. |
Returns
Type | Description |
---|---|
ALDevice | Returns a pointer to the specified context's device. |
GetCurrentContext()
This function retrieves the current context.
Declaration
public static extern ALContext GetCurrentContext()
Returns
Type | Description |
---|---|
ALContext | Returns a pointer to the current context. |
GetEnumValue(ALDevice, string)
This function retrieves the enum value for a specified enumeration name.
Declaration
public static extern int GetEnumValue(ALDevice device, string enumname)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | a pointer to the device to be queried. |
string | enumname | a null terminated string describing the enum value. |
Returns
Type | Description |
---|---|
int | Returns the enum value described by the enumName string. This is most often used for querying an enum value for an ALC extension. |
GetError(ALDevice)
This function retrieves the current context error state.
Declaration
public static extern AlcError GetError(ALDevice device)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to the device to retrieve the error state from. |
Returns
Type | Description |
---|---|
AlcError | Errorcode Int32. |
GetInteger(ALCaptureDevice, AlcGetInteger, int, int[])
This function returns integers related to the context.
Declaration
public static extern void GetInteger(ALCaptureDevice device, AlcGetInteger param, int size, int[] data)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to the device to be queried. |
AlcGetInteger | param | An attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES. |
int | size | The size of the destination buffer provided, in number of integers. |
int[] | data | A pointer to the buffer to be returned. |
GetInteger(ALCaptureDevice, AlcGetInteger, int, out int)
This function returns integers related to the context.
Declaration
public static extern void GetInteger(ALCaptureDevice device, AlcGetInteger param, int size, out int data)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to the device to be queried. |
AlcGetInteger | param | An attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES. |
int | size | The size of the destination buffer provided, in number of integers. |
int | data | A pointer to the buffer to be returned. |
GetInteger(ALCaptureDevice, AlcGetInteger, int, int*)
This function returns integers related to the context.
Declaration
public static extern void GetInteger(ALCaptureDevice device, AlcGetInteger param, int size, int* data)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to the device to be queried. |
AlcGetInteger | param | An attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES. |
int | size | The size of the destination buffer provided, in number of integers. |
int* | data | A pointer to the buffer to be returned. |
GetInteger(ALCaptureDevice, AlcGetInteger)
This function returns integers related to the context.
Declaration
public static int GetInteger(ALCaptureDevice device, AlcGetInteger param)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to the device to be queried. |
AlcGetInteger | param | An attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES. |
Returns
Type | Description |
---|---|
int | The int returned. |
GetInteger(ALDevice, AlcGetInteger, int, int[])
This function returns integers related to the context.
Declaration
public static extern void GetInteger(ALDevice device, AlcGetInteger param, int size, int[] data)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | a pointer to the device to be queried. |
AlcGetInteger | param | an attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES. |
int | size | the size of the destination buffer provided, in number of integers. |
int[] | data | a pointer to the buffer to be returned. |
GetInteger(ALDevice, AlcGetInteger, int, out int)
This function returns integers related to the context.
Declaration
public static extern void GetInteger(ALDevice device, AlcGetInteger param, int size, out int data)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to the device to be queried. |
AlcGetInteger | param | An attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES. |
int | size | The size of the destination buffer provided, in number of integers. |
int | data | A pointer to the buffer to be returned. |
GetInteger(ALDevice, AlcGetInteger, int, int*)
This function returns integers related to the context.
Declaration
public static extern void GetInteger(ALDevice device, AlcGetInteger param, int size, int* data)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | a pointer to the device to be queried. |
AlcGetInteger | param | an attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES. |
int | size | the size of the destination buffer provided, in number of integers. |
int* | data | a pointer to the buffer to be returned. |
GetInteger(ALDevice, AlcGetInteger, out int)
This function returns integers related to the context.
Declaration
public static void GetInteger(ALDevice device, AlcGetInteger param, out int data)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to the device to be queried. |
AlcGetInteger | param | An attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES. |
int | data | A pointer to the buffer to be returned. |
GetInteger(ALDevice, AlcGetInteger)
This function returns integers related to the context.
Declaration
public static int GetInteger(ALDevice device, AlcGetInteger param)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to the device to be queried. |
AlcGetInteger | param | An attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES. |
Returns
Type | Description |
---|---|
int | The value returned. |
GetProcAddress(ALDevice, string)
This function retrieves the address of a specified context extension function.
Declaration
public static extern IntPtr GetProcAddress(ALDevice device, string funcname)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | a pointer to the device to be queried for the function. |
string | funcname | a null-terminated string describing the function. |
Returns
Type | Description |
---|---|
IntPtr | Returns the address of the function, or NULL if it is not found. |
GetString(AlcGetStringList)
This function returns a List of strings related to the context.
Declaration
public static List<string> GetString(AlcGetStringList param)
Parameters
Type | Name | Description |
---|---|---|
AlcGetStringList | param | An attribute to be retrieved: ALC_DEVICE_SPECIFIER, ALC_CAPTURE_DEVICE_SPECIFIER, ALC_ALL_DEVICES_SPECIFIER. |
Returns
Type | Description |
---|---|
List<string> | A List of strings containing the names of the Devices. |
Remarks
ALC_DEVICE_SPECIFIER will return the name of the specified output device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. A list is a pointer to a series of strings separated by NULL characters, with the list terminated by two NULL characters. See Enumeration Extension for more details. ALC_CAPTURE_DEVICE_SPECIFIER will return the name of the specified capture device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. ALC_EXTENSIONS returns a list of available context extensions, with each extension separated by a space and the list terminated by a NULL character.
GetString(ALDevice, AlcGetString)
This strings related to the context.
Declaration
public static extern string GetString(ALDevice device, AlcGetString param)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to the device to be queried. |
AlcGetString | param | An attribute to be retrieved: ALC_DEFAULT_DEVICE_SPECIFIER, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER, ALC_DEVICE_SPECIFIER, ALC_CAPTURE_DEVICE_SPECIFIER, ALC_EXTENSIONS. |
Returns
Type | Description |
---|---|
string | A string containing the name of the Device. |
Remarks
ALC_DEFAULT_DEVICE_SPECIFIER will return the name of the default output device. ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER will return the name of the default capture device. ALC_DEVICE_SPECIFIER will return the name of the specified output device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. A list is a pointer to a series of strings separated by NULL characters, with the list terminated by two NULL characters. See Enumeration Extension for more details. ALC_CAPTURE_DEVICE_SPECIFIER will return the name of the specified capture device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. ALC_EXTENSIONS returns a list of available context extensions, with each extension separated by a space and the list terminated by a NULL character.
GetString(ALDevice, AlcGetStringList)
This function returns a List of strings related to the context.
Declaration
public static List<string> GetString(ALDevice device, AlcGetStringList param)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to the device to be queried. |
AlcGetStringList | param | An attribute to be retrieved: ALC_DEVICE_SPECIFIER, ALC_CAPTURE_DEVICE_SPECIFIER, ALC_ALL_DEVICES_SPECIFIER. |
Returns
Type | Description |
---|---|
List<string> | A List of strings containing the names of the Devices. |
Remarks
ALC_DEVICE_SPECIFIER will return the name of the specified output device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. A list is a pointer to a series of strings separated by NULL characters, with the list terminated by two NULL characters. See Enumeration Extension for more details. ALC_CAPTURE_DEVICE_SPECIFIER will return the name of the specified capture device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. ALC_EXTENSIONS returns a list of available context extensions, with each extension separated by a space and the list terminated by a NULL character.
GetString(ALDevice, GetEnumerationString)
Gets a named property on the context.
Declaration
public static extern string GetString(ALDevice device, GetEnumerationString param)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | The device for the context. |
GetEnumerationString | param | The named property. |
Returns
Type | Description |
---|---|
string | The value. |
GetStringList(GetEnumerationStringList)
Gets a named property on the context.
Declaration
public static IEnumerable<string> GetStringList(GetEnumerationStringList param)
Parameters
Type | Name | Description |
---|---|---|
GetEnumerationStringList | param | The named property. |
Returns
Type | Description |
---|---|
IEnumerable<string> | The value. |
GetStringListPtr(ALDevice, GetEnumerationStringList)
Gets a named property on the context.
Declaration
public static extern byte* GetStringListPtr(ALDevice device, GetEnumerationStringList param)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | The device for the context. |
GetEnumerationStringList | param | The named property. |
Returns
Type | Description |
---|---|
byte* | The value. |
GetStringPtr(ALDevice, AlcGetString)
This strings related to the context.
Declaration
public static extern byte* GetStringPtr(ALDevice device, AlcGetString param)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to the device to be queried. |
AlcGetString | param | An attribute to be retrieved: ALC_DEFAULT_DEVICE_SPECIFIER, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER, ALC_DEVICE_SPECIFIER, ALC_CAPTURE_DEVICE_SPECIFIER, ALC_EXTENSIONS. |
Returns
Type | Description |
---|---|
byte* | A string containing the name of the Device. |
Remarks
ALC_DEFAULT_DEVICE_SPECIFIER will return the name of the default output device. ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER will return the name of the default capture device. ALC_DEVICE_SPECIFIER will return the name of the specified output device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. A list is a pointer to a series of strings separated by NULL characters, with the list terminated by two NULL characters. See Enumeration Extension for more details. ALC_CAPTURE_DEVICE_SPECIFIER will return the name of the specified capture device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. ALC_EXTENSIONS returns a list of available context extensions, with each extension separated by a space and the list terminated by a NULL character.
IsCaptureExtensionPresent(ALCaptureDevice)
Checks to see that the ALC_EXT_CAPTURE extension is present. This will always be available in 1.1 devices or later.
Declaration
public static bool IsCaptureExtensionPresent(ALCaptureDevice device)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | The device to check the extension is present for. |
Returns
Type | Description |
---|---|
bool | If the ALC_EXT_CAPTURE extension was present. |
IsCaptureExtensionPresent(ALDevice)
Checks to see that the ALC_EXT_CAPTURE extension is present. This will always be available in 1.1 devices or later.
Declaration
public static bool IsCaptureExtensionPresent(ALDevice device)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | The device to check the extension is present for. |
Returns
Type | Description |
---|---|
bool | If the ALC_EXT_CAPTURE extension was present. |
IsEnumerationExtensionPresent(ALCaptureDevice)
Checks to see that the ALC_ENUMERATION_EXT extension is present. This will always be available in 1.1 devices or later.
Declaration
public static bool IsEnumerationExtensionPresent(ALCaptureDevice device)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | The device to check the extension is present for. |
Returns
Type | Description |
---|---|
bool | If the ALC_ENUMERATION_EXT extension was present. |
IsEnumerationExtensionPresent(ALDevice)
Checks to see that the ALC_ENUMERATION_EXT extension is present. This will always be available in 1.1 devices or later.
Declaration
public static bool IsEnumerationExtensionPresent(ALDevice device)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | The device to check the extension is present for. |
Returns
Type | Description |
---|---|
bool | If the ALC_ENUMERATION_EXT extension was present. |
IsExtensionPresent(ALCaptureDevice, string)
This function queries if a specified context extension is available.
Declaration
public static extern bool IsExtensionPresent(ALCaptureDevice device, string extname)
Parameters
Type | Name | Description |
---|---|---|
ALCaptureDevice | device | A pointer to the device to be queried for an extension. |
string | extname | A null-terminated string describing the extension. |
Returns
Type | Description |
---|---|
bool | Returns True if the extension is available, False if the extension is not available. |
IsExtensionPresent(ALDevice, string)
This function queries if a specified context extension is available.
Declaration
public static extern bool IsExtensionPresent(ALDevice device, string extname)
Parameters
Type | Name | Description |
---|---|---|
ALDevice | device | A pointer to the device to be queried for an extension. |
string | extname | A null-terminated string describing the extension. |
Returns
Type | Description |
---|---|
bool | Returns True if the extension is available, False if the extension is not available. |
MakeContextCurrent(ALContext)
This function makes a specified context the current context.
Declaration
public static extern bool MakeContextCurrent(ALContext context)
Parameters
Type | Name | Description |
---|---|---|
ALContext | context | A pointer to the new context. |
Returns
Type | Description |
---|---|
bool | Returns True on success, or False on failure. |
OpenDevice(string)
This function opens a device by name.
Declaration
public static extern ALDevice OpenDevice(string devicename)
Parameters
Type | Name | Description |
---|---|---|
string | devicename | A null-terminated string describing a device. |
Returns
Type | Description |
---|---|
ALDevice | Returns a pointer to the opened device. The return value will be NULL if there is an error. |
ProcessContext(ALContext)
This function tells a context to begin processing. When a context is suspended, changes in OpenAL state will be accepted but will not be processed. alcSuspendContext can be used to suspend a context, and then all the OpenAL state changes can be applied at once, followed by a call to alcProcessContext to apply all the state changes immediately. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.
Declaration
public static extern void ProcessContext(ALContext context)
Parameters
Type | Name | Description |
---|---|---|
ALContext | context | A pointer to the new context. |
SuspendContext(ALContext)
This function suspends processing on a specified context. When a context is suspended, changes in OpenAL state will be accepted but will not be processed. A typical use of alcSuspendContext would be to suspend a context, apply all the OpenAL state changes at once, and then call alcProcessContext to apply all the state changes at once. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.
Declaration
public static extern void SuspendContext(ALContext context)
Parameters
Type | Name | Description |
---|---|---|
ALContext | context | A pointer to the context to be suspended. |