Class AL
Provides access to the OpenAL 1.1 flat API.
Inherited Members
Namespace: OpenTK.Audio.OpenAL
Assembly: OpenTK.dll
Syntax
public static class AL
Methods
BindBufferToSource(Int32, Int32)
(Helper) Binds a Buffer to a Source handle.
Declaration
public static void BindBufferToSource(int source, int buffer)
Parameters
Type | Name | Description |
---|---|---|
Int32 | source | Source name to attach the Buffer to. |
Int32 | buffer | Buffer name which is attached to the Source. |
BindBufferToSource(UInt32, UInt32)
(Helper) Binds a Buffer to a Source handle.
Declaration
[CLSCompliant(false)]
public static void BindBufferToSource(uint source, uint buffer)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | source | Source name to attach the Buffer to. |
UInt32 | buffer | Buffer name which is attached to the Source. |
BufferData(Int32, ALFormat, IntPtr, Int32, Int32)
This function fills a buffer with audio buffer. All the pre-defined formats are PCM buffer, but this function may be used by extensions to load other buffer types as well.
Declaration
public static void BufferData(int bid, ALFormat format, IntPtr buffer, int size, int freq)
Parameters
Type | Name | Description |
---|---|---|
Int32 | bid | buffer Handle/Name to be filled with buffer. |
ALFormat | format | Format type from among the following: ALFormat.Mono8, ALFormat.Mono16, ALFormat.Stereo8, ALFormat.Stereo16. |
IntPtr | buffer | Pointer to a pinned audio buffer. |
Int32 | size | The size of the audio buffer in bytes. |
Int32 | freq | The frequency of the audio buffer. |
BufferData(UInt32, ALFormat, IntPtr, Int32, Int32)
This function fills a buffer with audio buffer. All the pre-defined formats are PCM buffer, but this function may be used by extensions to load other buffer types as well.
Declaration
[CLSCompliant(false)]
public static extern void BufferData(uint bid, ALFormat format, IntPtr buffer, int size, int freq)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | bid | buffer Handle/Name to be filled with buffer. |
ALFormat | format | Format type from among the following: ALFormat.Mono8, ALFormat.Mono16, ALFormat.Stereo8, ALFormat.Stereo16. |
IntPtr | buffer | Pointer to a pinned audio buffer. |
Int32 | size | The size of the audio buffer in bytes. |
Int32 | freq | The frequency of the audio buffer. |
BufferData<TBuffer>(Int32, ALFormat, TBuffer[], Int32, Int32)
This function fills a buffer with audio buffer. All the pre-defined formats are PCM buffer, but this function may be used by extensions to load other buffer types as well.
Declaration
public static void BufferData<TBuffer>(int bid, ALFormat format, TBuffer[] buffer, int size, int freq)
where TBuffer : struct
Parameters
Type | Name | Description |
---|---|---|
Int32 | bid | buffer Handle/Name to be filled with buffer. |
ALFormat | format | Format type from among the following: ALFormat.Mono8, ALFormat.Mono16, ALFormat.Stereo8, ALFormat.Stereo16. |
TBuffer[] | buffer | The audio buffer. |
Int32 | size | The size of the audio buffer in bytes. |
Int32 | freq | The frequency of the audio buffer. |
Type Parameters
Name | Description |
---|---|
TBuffer |
DeleteBuffer(Int32)
This function deletes one buffer only, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.
Declaration
public static void DeleteBuffer(int buffer)
Parameters
Type | Name | Description |
---|---|---|
Int32 | buffer | Pointer to a buffer name identifying the buffer to be deleted. |
DeleteBuffer(ref UInt32)
This function deletes one buffer only, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.
Declaration
[CLSCompliant(false)]
public static void DeleteBuffer(ref uint buffer)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | buffer | Pointer to a buffer name identifying the buffer to be deleted. |
DeleteBuffers(Int32, Int32*)
This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.
Declaration
[CLSCompliant(false)]
public static extern void DeleteBuffers(int n, int *buffers)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of buffers to be deleted. |
Int32* | buffers | Pointer to an array of buffer names identifying the buffers to be deleted. |
DeleteBuffers(Int32, ref Int32)
This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.
Declaration
public static void DeleteBuffers(int n, ref int buffers)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of buffers to be deleted. |
Int32 | buffers | Pointer to an array of buffer names identifying the buffers to be deleted. |
DeleteBuffers(Int32, UInt32*)
This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.
Declaration
[CLSCompliant(false)]
public static extern void DeleteBuffers(int n, uint *buffers)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of buffers to be deleted. |
UInt32* | buffers | Pointer to an array of buffer names identifying the buffers to be deleted. |
DeleteBuffers(Int32, ref UInt32)
This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.
Declaration
[CLSCompliant(false)]
public static void DeleteBuffers(int n, ref uint buffers)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of buffers to be deleted. |
UInt32 | buffers | Pointer to an array of buffer names identifying the buffers to be deleted. |
DeleteBuffers(Int32[])
This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.
Declaration
public static void DeleteBuffers(int[] buffers)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | buffers | Pointer to an array of buffer names identifying the buffers to be deleted. |
DeleteBuffers(UInt32[])
This function deletes one buffer only, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.
Declaration
[CLSCompliant(false)]
public static void DeleteBuffers(uint[] buffers)
Parameters
Type | Name | Description |
---|---|---|
UInt32[] | buffers | Pointer to a buffer name identifying the buffer to be deleted. |
DeleteSource(Int32)
This function deletes one source only.
Declaration
public static void DeleteSource(int source)
Parameters
Type | Name | Description |
---|---|---|
Int32 | source | Pointer to a source name identifying the source to be deleted. |
DeleteSource(ref UInt32)
This function deletes one source only.
Declaration
[CLSCompliant(false)]
public static void DeleteSource(ref uint source)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | source | Pointer to a source name identifying the source to be deleted. |
DeleteSources(Int32, ref Int32)
This function deletes one or more sources.
Declaration
public static extern void DeleteSources(int n, ref int sources)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of sources to be deleted. |
Int32 | sources | Reference to a single source, or an array of source names identifying the sources to be deleted. |
DeleteSources(Int32, UInt32*)
This function deletes one or more sources.
Declaration
[CLSCompliant(false)]
public static extern void DeleteSources(int n, uint *sources)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of sources to be deleted. |
UInt32* | sources | Pointer to an array of source names identifying the sources to be deleted. |
DeleteSources(Int32, ref UInt32)
This function deletes one or more sources.
Declaration
[CLSCompliant(false)]
public static extern void DeleteSources(int n, ref uint sources)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of sources to be deleted. |
UInt32 | sources | Reference to a single source, or an array of source names identifying the sources to be deleted. |
DeleteSources(Int32[])
This function deletes one or more sources.
Declaration
public static void DeleteSources(int[] sources)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | sources | An array of source names identifying the sources to be deleted. |
DeleteSources(UInt32[])
This function deletes one or more sources.
Declaration
[CLSCompliant(false)]
public static void DeleteSources(uint[] sources)
Parameters
Type | Name | Description |
---|---|---|
UInt32[] | sources | An array of source names identifying the sources to be deleted. |
Disable(ALCapability)
This function disables a feature of the OpenAL driver.
Declaration
public static extern void Disable(ALCapability capability)
Parameters
Type | Name | Description |
---|---|---|
ALCapability | capability | The name of a capability to disable. |
DistanceModel(ALDistanceModel)
This function selects the OpenAL distance model – ALDistanceModel.InverseDistance, ALDistanceModel.InverseDistanceClamped, ALDistanceModel.LinearDistance, ALDistanceModel.LinearDistanceClamped, ALDistanceModel.ExponentDistance, ALDistanceModel.ExponentDistanceClamped, or ALDistanceModel.None. The default distance model in OpenAL is ALDistanceModel.InverseDistanceClamped.
Declaration
public static extern void DistanceModel(ALDistanceModel distancemodel)
Parameters
Type | Name | Description |
---|---|---|
ALDistanceModel | distancemodel |
Remarks
The ALDistanceModel .InverseDistance model works according to the following formula: gain = ALSourcef.ReferenceDistance / (ALSourcef.ReferenceDistance + ALSourcef.RolloffFactor * (distance – ALSourcef.ReferenceDistance));
The ALDistanceModel .InverseDistanceClamped model works according to the following formula: distance = max(distance,ALSourcef.ReferenceDistance); distance = min(distance,ALSourcef.MaxDistance); gain = ALSourcef.ReferenceDistance / (ALSourcef.ReferenceDistance + ALSourcef.RolloffFactor * (distance – ALSourcef.ReferenceDistance));
The ALDistanceModel.LinearDistance model works according to the following formula: distance = min(distance, ALSourcef.MaxDistance) // avoid negative gain gain = (1 – ALSourcef.RolloffFactor * (distance – ALSourcef.ReferenceDistance) / (ALSourcef.MaxDistance – ALSourcef.ReferenceDistance))
The ALDistanceModel.LinearDistanceClamped model works according to the following formula: distance = max(distance, ALSourcef.ReferenceDistance) distance = min(distance, ALSourcef.MaxDistance) gain = (1 – ALSourcef.RolloffFactor * (distance – ALSourcef.ReferenceDistance) / (ALSourcef.MaxDistance – ALSourcef.ReferenceDistance))
The ALDistanceModel.ExponentDistance model works according to the following formula: gain = (distance / ALSourcef.ReferenceDistance) ^ (- ALSourcef.RolloffFactor)
The ALDistanceModel.ExponentDistanceClamped model works according to the following formula: distance = max(distance, ALSourcef.ReferenceDistance) distance = min(distance, ALSourcef.MaxDistance) gain = (distance / ALSourcef.ReferenceDistance) ^ (- ALSourcef.RolloffFactor)
The ALDistanceModel.None model works according to the following formula: gain = 1f;
DopplerFactor(Single)
AL.DopplerFactor is a simple scaling of source and listener velocities to exaggerate or deemphasize the Doppler (pitch) shift resulting from the calculation.
Declaration
public static extern void DopplerFactor(float value)
Parameters
Type | Name | Description |
---|---|---|
Single | value | A negative value will result in an error, the command is then ignored. The default value is 1f. The current setting can be queried using AL.Get with parameter ALGetFloat.SpeedOfSound. |
DopplerVelocity(Single)
This function is deprecated and should not be used.
Declaration
public static extern void DopplerVelocity(float value)
Parameters
Type | Name | Description |
---|---|---|
Single | value | The default is 1.0f. |
Enable(ALCapability)
This function enables a feature of the OpenAL driver. There are no capabilities defined in OpenAL 1.1 to be used with this function, but it may be used by an extension.
Declaration
public static extern void Enable(ALCapability capability)
Parameters
Type | Name | Description |
---|---|---|
ALCapability | capability | The name of a capability to enable. |
GenBuffer()
This function generates one buffer only, which contain audio data (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers).
Declaration
public static int GenBuffer()
Returns
Type | Description |
---|---|
Int32 | Pointer to an uint value which will store the name of the new buffer. |
GenBuffer(out UInt32)
This function generates one buffer only, which contain audio data (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers).
Declaration
[CLSCompliant(false)]
public static void GenBuffer(out uint buffer)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | buffer | Pointer to an uint value which will store the names of the new buffer. |
GenBuffers(Int32)
This function generates one or more buffers, which contain audio data (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers).
Declaration
public static int[] GenBuffers(int n)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of buffers to be generated. |
Returns
Type | Description |
---|---|
Int32[] | Pointer to an array of uint values which will store the names of the new buffers. |
GenBuffers(Int32, Int32*)
This function generates one or more buffers, which contain audio buffer (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers).
Declaration
[CLSCompliant(false)]
public static extern void GenBuffers(int n, int *buffers)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of buffers to be generated. |
Int32* | buffers | Pointer to an array of uint values which will store the names of the new buffers. |
GenBuffers(Int32, out Int32)
This function generates one or more buffers, which contain audio buffer (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers).
Declaration
public static void GenBuffers(int n, out int buffers)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of buffers to be generated. |
Int32 | buffers | Pointer to an array of uint values which will store the names of the new buffers. |
GenBuffers(Int32, UInt32*)
This function generates one or more buffers, which contain audio buffer (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers).
Declaration
[CLSCompliant(false)]
public static extern void GenBuffers(int n, uint *buffers)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of buffers to be generated. |
UInt32* | buffers | Pointer to an array of uint values which will store the names of the new buffers. |
GenBuffers(Int32, out UInt32)
This function generates one or more buffers, which contain audio buffer (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers).
Declaration
[CLSCompliant(false)]
public static void GenBuffers(int n, out uint buffers)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of buffers to be generated. |
UInt32 | buffers | Pointer to an array of uint values which will store the names of the new buffers. |
GenSource()
This function generates one source only. References to sources are int values, which are used wherever a source reference is needed (in calls such as AL.DeleteSources and AL.Source with parameter ALSourcei).
Declaration
public static int GenSource()
Returns
Type | Description |
---|---|
Int32 | Pointer to an int value which will store the name of the new source. |
GenSource(out UInt32)
This function generates one source only. References to sources are uint values, which are used wherever a source reference is needed (in calls such as AL.DeleteSources and AL.Source with parameter ALSourcei).
Declaration
[CLSCompliant(false)]
public static void GenSource(out uint source)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | source | Pointer to an uint value which will store the name of the new source. |
GenSources(Int32)
This function generates one or more sources. References to sources are int values, which are used wherever a source reference is needed (in calls such as AL.DeleteSources and AL.Source with parameter ALSourcei).
Declaration
public static int[] GenSources(int n)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of sources to be generated. |
Returns
Type | Description |
---|---|
Int32[] | Pointer to an array of int values which will store the names of the new sources. |
GenSources(Int32, out Int32)
This function generates one or more sources. References to sources are int values, which are used wherever a source reference is needed (in calls such as AL.DeleteSources and AL.Source with parameter ALSourcei).
Declaration
public static void GenSources(int n, out int sources)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of sources to be generated. |
Int32 | sources | Pointer to an array of int values which will store the names of the new sources. |
GenSources(Int32, out UInt32)
This function generates one or more sources. References to sources are uint values, which are used wherever a source reference is needed (in calls such as AL.DeleteSources and AL.Source with parameter ALSourcei).
Declaration
[CLSCompliant(false)]
public static void GenSources(int n, out uint sources)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | The number of sources to be generated. |
UInt32 | sources | Pointer to an array of uint values which will store the names of the new sources. |
GenSources(Int32[])
This function generates one or more sources. References to sources are int values, which are used wherever a source reference is needed (in calls such as AL.DeleteSources and AL.Source with parameter ALSourcei).
Declaration
public static void GenSources(int[] sources)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | sources | Pointer to an array of int values which will store the names of the new sources. |
Get(ALGetFloat)
This function returns a floating-point OpenAL state.
Declaration
public static extern float Get(ALGetFloat param)
Parameters
Type | Name | Description |
---|---|---|
ALGetFloat | param | the state to be queried: DopplerFactor, SpeedOfSound. |
Returns
Type | Description |
---|---|
Single | The floating-point state described by param will be returned. |
Get(ALGetInteger)
This function returns an integer OpenAL state.
Declaration
public static extern int Get(ALGetInteger param)
Parameters
Type | Name | Description |
---|---|---|
ALGetInteger | param | the state to be queried: DistanceModel. |
Returns
Type | Description |
---|---|
Int32 | The integer state described by param will be returned. |
Get(ALGetString)
This function retrieves an OpenAL string property.
Declaration
public static string Get(ALGetString param)
Parameters
Type | Name | Description |
---|---|---|
ALGetString | param | The property to be returned: Vendor, Version, Renderer and Extensions |
Returns
Type | Description |
---|---|
String | Returns a pointer to a null-terminated string. |
GetBuffer(Int32, ALGetBufferi, out Int32)
This function retrieves an integer property of a buffer.
Declaration
public static void GetBuffer(int bid, ALGetBufferi param, out int value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | bid | Buffer name whose attribute is being retrieved |
ALGetBufferi | param | The name of the attribute to be retrieved: ALGetBufferi.Frequency, Bits, Channels, Size, and the currently hidden AL_DATA (dangerous). |
Int32 | value | A pointer to an int to hold the retrieved buffer |
GetBuffer(UInt32, ALGetBufferi, out Int32)
This function retrieves an integer property of a buffer.
Declaration
[CLSCompliant(false)]
public static extern void GetBuffer(uint bid, ALGetBufferi param, out int value)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | bid | Buffer name whose attribute is being retrieved |
ALGetBufferi | param | The name of the attribute to be retrieved: ALGetBufferi.Frequency, Bits, Channels, Size, and the currently hidden AL_DATA (dangerous). |
Int32 | value | A pointer to an int to hold the retrieved buffer |
GetDistanceModel()
Returns the ALDistanceModel of the current context.
Declaration
public static ALDistanceModel GetDistanceModel()
Returns
Type | Description |
---|---|
ALDistanceModel | The ALDistanceModel of the current context. |
GetEnumValue(String)
This function returns the enumeration value of an OpenAL token, described by a string.
Declaration
public static extern int GetEnumValue(string ename)
Parameters
Type | Name | Description |
---|---|---|
String | ename | A string describing an OpenAL token. Example "AL_DISTANCE_MODEL" |
Returns
Type | Description |
---|---|
Int32 | Returns the actual ALenum described by a string. Returns 0 if the string doesn’t describe a valid OpenAL token. |
GetError()
Error support. Obtain the most recent error generated in the AL state machine. When an error is detected by AL, a flag is set and the error code is recorded. Further errors, if they occur, do not affect this recorded code. When alGetError is called, the code is returned and the flag is cleared, so that a further error will again record its code.
Declaration
public static extern ALError GetError()
Returns
Type | Description |
---|---|
ALError | The first error that occured. can be used with AL.GetString. Returns an Alenum representing the error state. When an OpenAL error occurs, the error state is set and will not be changed until the error state is retrieved using alGetError. Whenever alGetError is called, the error state is cleared and the last state (the current state when the call was made) is returned. To isolate error detection to a specific portion of code, alGetError should be called before the isolated section to clear the current error state. |
GetErrorString(ALError)
This function retrieves an OpenAL string property.
Declaration
public static string GetErrorString(ALError param)
Parameters
Type | Name | Description |
---|---|---|
ALError | param | The human-readable errorstring to be returned. |
Returns
Type | Description |
---|---|
String | Returns a pointer to a null-terminated string. |
GetListener(ALListener3f, out Vector3)
This function retrieves a Math.Vector3 from a property of the listener.
Declaration
public static void GetListener(ALListener3f param, out Vector3 values)
Parameters
Type | Name | Description |
---|---|---|
ALListener3f | param | The name of the attribute to be retrieved: ALListener3f.Position, ALListener3f.Velocity |
Vector3 | values | A Math.Vector3 to hold the three floats being retrieved. |
GetListener(ALListener3f, out Single, out Single, out Single)
This function retrieves a set of three floating-point values from a property of the listener.
Declaration
public static extern void GetListener(ALListener3f param, out float value1, out float value2, out float value3)
Parameters
Type | Name | Description |
---|---|---|
ALListener3f | param | The name of the attribute to be retrieved: ALListener3f.Position, ALListener3f.Velocity |
Single | value1 | The first floating-point value being retrieved. |
Single | value2 | The second floating-point value being retrieved. |
Single | value3 | The third floating-point value being retrieved. |
GetListener(ALListenerf, out Single)
This function retrieves a floating-point property of the listener.
Declaration
public static extern void GetListener(ALListenerf param, out float value)
Parameters
Type | Name | Description |
---|---|---|
ALListenerf | param | the name of the attribute to be retrieved: ALListenerf.Gain |
Single | value | a pointer to the floating-point value being retrieved. |
GetListener(ALListenerfv, out Vector3, out Vector3)
This function retrieves two Math.Vector3 properties of the listener.
Declaration
public static void GetListener(ALListenerfv param, out Vector3 at, out Vector3 up)
Parameters
Type | Name | Description |
---|---|---|
ALListenerfv | param | the name of the attribute to be retrieved: ALListenerfv.Orientation |
Vector3 | at | A Math.Vector3 for the At-Vector. |
Vector3 | up | A Math.Vector3 for the Up-Vector. |
GetListener(ALListenerfv, Single*)
This function retrieves a floating-point vector property of the listener. You must pin it manually.
Declaration
[CLSCompliant(false)]
public static extern void GetListener(ALListenerfv param, float *values)
Parameters
Type | Name | Description |
---|---|---|
ALListenerfv | param | the name of the attribute to be retrieved: ALListener3f.Position, ALListener3f.Velocity, ALListenerfv.Orientation |
Single* | values | A pointer to the floating-point vector value being retrieved. |
GetProcAddress(String)
This function returns the address of an OpenAL extension function. Handle with care.
Declaration
public static extern IntPtr GetProcAddress(string fname)
Parameters
Type | Name | Description |
---|---|---|
String | fname | A string containing the function name. |
Returns
Type | Description |
---|---|
IntPtr | The return value is a pointer to the specified function. The return value will be IntPtr.Zero if the function is not found. |
GetSource(Int32, ALGetSourcei, out Int32)
This function retrieves an integer property of a source.
Declaration
public static void GetSource(int sid, ALGetSourcei param, out int value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | Source name whose attribute is being retrieved. |
ALGetSourcei | param | The name of the attribute to retrieve: ALSourcei.SourceRelative, Buffer, SourceState, BuffersQueued, BuffersProcessed. |
Int32 | value | A pointer to the integer value being retrieved. |
GetSource(Int32, ALSource3f, out Vector3)
This function retrieves three floating-point values representing a property of a source.
Declaration
public static void GetSource(int sid, ALSource3f param, out Vector3 values)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | Source name whose attribute is being retrieved. |
ALSource3f | param | the name of the attribute being retrieved: ALSource3f.Position, Velocity, Direction. |
Vector3 | values | A Math.Vector3 to retrieve the values to. |
GetSource(Int32, ALSource3f, out Single, out Single, out Single)
This function retrieves three floating-point values representing a property of a source.
Declaration
public static void GetSource(int sid, ALSource3f param, out float value1, out float value2, out float value3)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | Source name whose attribute is being retrieved. |
ALSource3f | param | the name of the attribute being retrieved: ALSource3f.Position, Velocity, Direction. |
Single | value1 | Pointer to the value to retrieve. |
Single | value2 | Pointer to the value to retrieve. |
Single | value3 | Pointer to the value to retrieve. |
GetSource(Int32, ALSourceb, out Boolean)
This function retrieves a bool property of a source.
Declaration
public static void GetSource(int sid, ALSourceb param, out bool value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | Source name whose attribute is being retrieved. |
ALSourceb | param | The name of the attribute to get: ALSourceb.SourceRelative, Looping. |
Boolean | value | A pointer to the bool value being retrieved. |
GetSource(Int32, ALSourcef, out Single)
This function retrieves a floating-point property of a source.
Declaration
public static void GetSource(int sid, ALSourcef param, out float value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | Source name whose attribute is being retrieved. |
ALSourcef | param | The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency. |
Single | value | A pointer to the floating-point value being retrieved |
GetSource(UInt32, ALGetSourcei, out Int32)
This function retrieves an integer property of a source.
Declaration
[CLSCompliant(false)]
public static extern void GetSource(uint sid, ALGetSourcei param, out int value)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | Source name whose attribute is being retrieved. |
ALGetSourcei | param | The name of the attribute to retrieve: ALSourcei.SourceRelative, Buffer, SourceState, BuffersQueued, BuffersProcessed. |
Int32 | value | A pointer to the integer value being retrieved. |
GetSource(UInt32, ALSource3f, out Vector3)
This function retrieves three floating-point values representing a property of a source.
Declaration
[CLSCompliant(false)]
public static void GetSource(uint sid, ALSource3f param, out Vector3 values)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | Source name whose attribute is being retrieved. |
ALSource3f | param | the name of the attribute being retrieved: ALSource3f.Position, Velocity, Direction. |
Vector3 | values | A Math.Vector3 to retrieve the values to. |
GetSource(UInt32, ALSource3f, out Single, out Single, out Single)
This function retrieves three floating-point values representing a property of a source.
Declaration
[CLSCompliant(false)]
public static extern void GetSource(uint sid, ALSource3f param, out float value1, out float value2, out float value3)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | Source name whose attribute is being retrieved. |
ALSource3f | param | the name of the attribute being retrieved: ALSource3f.Position, Velocity, Direction. |
Single | value1 | Pointer to the value to retrieve. |
Single | value2 | Pointer to the value to retrieve. |
Single | value3 | Pointer to the value to retrieve. |
GetSource(UInt32, ALSourceb, out Boolean)
This function retrieves a bool property of a source.
Declaration
[CLSCompliant(false)]
public static void GetSource(uint sid, ALSourceb param, out bool value)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | Source name whose attribute is being retrieved. |
ALSourceb | param | The name of the attribute to get: ALSourceb.SourceRelative, Looping. |
Boolean | value | A pointer to the bool value being retrieved. |
GetSource(UInt32, ALSourcef, out Single)
This function retrieves a floating-point property of a source.
Declaration
[CLSCompliant(false)]
public static extern void GetSource(uint sid, ALSourcef param, out float value)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | Source name whose attribute is being retrieved. |
ALSourcef | param | The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency. |
Single | value | A pointer to the floating-point value being retrieved |
GetSourceState(Int32)
(Helper) Returns Source state information.
Declaration
public static ALSourceState GetSourceState(int sid)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | The source to be queried. |
Returns
Type | Description |
---|---|
ALSourceState | state information from OpenAL. |
GetSourceState(UInt32)
(Helper) Returns Source state information.
Declaration
[CLSCompliant(false)]
public static ALSourceState GetSourceState(uint sid)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The source to be queried. |
Returns
Type | Description |
---|---|
ALSourceState | state information from OpenAL. |
GetSourceType(Int32)
(Helper) Returns Source type information.
Declaration
public static ALSourceType GetSourceType(int sid)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | The source to be queried. |
Returns
Type | Description |
---|---|
ALSourceType | type information from OpenAL. |
GetSourceType(UInt32)
(Helper) Returns Source type information.
Declaration
[CLSCompliant(false)]
public static ALSourceType GetSourceType(uint sid)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The source to be queried. |
Returns
Type | Description |
---|---|
ALSourceType | type information from OpenAL. |
IsBuffer(Int32)
This function tests if a buffer name is valid, returning True if valid, False if not.
Declaration
public static bool IsBuffer(int bid)
Parameters
Type | Name | Description |
---|---|---|
Int32 | bid | A buffer Handle previously allocated with GenBuffers(Int32). |
Returns
Type | Description |
---|---|
Boolean | Success. |
IsBuffer(UInt32)
This function tests if a buffer name is valid, returning True if valid, False if not.
Declaration
[CLSCompliant(false)]
public static extern bool IsBuffer(uint bid)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | bid | A buffer Handle previously allocated with GenBuffers(Int32). |
Returns
Type | Description |
---|---|
Boolean | Success. |
IsEnabled(ALCapability)
This function returns a boolean indicating if a specific feature is enabled in the OpenAL driver.
Declaration
public static extern bool IsEnabled(ALCapability capability)
Parameters
Type | Name | Description |
---|---|---|
ALCapability | capability | The name of a capability to enable. |
Returns
Type | Description |
---|---|
Boolean | True if enabled, False if disabled. |
IsExtensionPresent(String)
This function tests if a specific Extension is available for the OpenAL driver.
Declaration
public static extern bool IsExtensionPresent(string extname)
Parameters
Type | Name | Description |
---|---|---|
String | extname | A string naming the desired extension. Example: "EAX-RAM" |
Returns
Type | Description |
---|---|
Boolean | Returns True if the Extension is available or False if not available. |
IsSource(Int32)
This function tests if a source name is valid, returning True if valid and False if not.
Declaration
public static bool IsSource(int sid)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | A source name to be tested for validity |
Returns
Type | Description |
---|---|
Boolean | Success. |
IsSource(UInt32)
This function tests if a source name is valid, returning True if valid and False if not.
Declaration
[CLSCompliant(false)]
public static extern bool IsSource(uint sid)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | A source name to be tested for validity |
Returns
Type | Description |
---|---|
Boolean | Success. |
Listener(ALListener3f, ref Vector3)
This function sets a Math.Vector3 property for the listener.
Declaration
public static void Listener(ALListener3f param, ref Vector3 values)
Parameters
Type | Name | Description |
---|---|---|
ALListener3f | param | The name of the attribute to set: ALListener3f.Position, ALListener3f.Velocity |
Vector3 | values | The Math.Vector3 to set the attribute to. |
Listener(ALListener3f, Single, Single, Single)
This function sets a floating-point property for the listener.
Declaration
public static extern void Listener(ALListener3f param, float value1, float value2, float value3)
Parameters
Type | Name | Description |
---|---|---|
ALListener3f | param | The name of the attribute to set: ALListener3f.Position, ALListener3f.Velocity |
Single | value1 | The value to set the attribute to. |
Single | value2 | The value to set the attribute to. |
Single | value3 | The value to set the attribute to. |
Listener(ALListenerf, Single)
This function sets a floating-point property for the listener.
Declaration
public static extern void Listener(ALListenerf param, float value)
Parameters
Type | Name | Description |
---|---|---|
ALListenerf | param | The name of the attribute to be set: ALListenerf.Gain |
Single | value | The float value to set the attribute to. |
Listener(ALListenerfv, ref Vector3, ref Vector3)
This function sets two Math.Vector3 properties of the listener.
Declaration
public static void Listener(ALListenerfv param, ref Vector3 at, ref Vector3 up)
Parameters
Type | Name | Description |
---|---|---|
ALListenerfv | param | The name of the attribute to be set: ALListenerfv.Orientation |
Vector3 | at | A Math.Vector3 for the At-Vector. |
Vector3 | up | A Math.Vector3 for the Up-Vector. |
Listener(ALListenerfv, ref Single[])
This function sets a floating-point vector property of the listener.
Declaration
public static void Listener(ALListenerfv param, ref float[] values)
Parameters
Type | Name | Description |
---|---|---|
ALListenerfv | param | The name of the attribute to be set: ALListener3f.Position, ALListener3f.Velocity, ALListenerfv.Orientation |
Single[] | values | Pointer to floating-point vector values. |
Source(Int32, ALSource3f, ref Vector3)
This function sets a source property requiring three floating-point values.
Declaration
public static void Source(int sid, ALSource3f param, ref Vector3 values)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | Source name whose attribute is being set. |
ALSource3f | param | The name of the attribute to set: ALSource3f.Position, Velocity, Direction. |
Vector3 | values | A Math.Vector3 which the attribute will be set to. |
Source(Int32, ALSource3f, Single, Single, Single)
This function sets a source property requiring three floating-point values.
Declaration
public static void Source(int sid, ALSource3f param, float value1, float value2, float value3)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | Source name whose attribute is being set. |
ALSource3f | param | The name of the attribute to set: ALSource3f.Position, Velocity, Direction. |
Single | value1 | The three ALfloat values which the attribute will be set to. |
Single | value2 | The three ALfloat values which the attribute will be set to. |
Single | value3 | The three ALfloat values which the attribute will be set to. |
Source(Int32, ALSource3i, Int32, Int32, Int32)
This function sets 3 integer properties of a source. This property is used to establish connections between Sources and Auxiliary Effect Slots.
Declaration
public static void Source(int sid, ALSource3i param, int value1, int value2, int value3)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | Source name whose attribute is being set. |
ALSource3i | param | The name of the attribute to set: EfxAuxiliarySendFilter |
Int32 | value1 | The value to set the attribute to. (EFX Extension) The destination Auxiliary Effect Slot ID |
Int32 | value2 | The value to set the attribute to. (EFX Extension) The Auxiliary Send number. |
Int32 | value3 | The value to set the attribute to. (EFX Extension) optional Filter ID. |
Source(Int32, ALSourceb, Boolean)
This function sets an bool property of a source.
Declaration
public static void Source(int sid, ALSourceb param, bool value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | Source name whose attribute is being set. |
ALSourceb | param | The name of the attribute to set: ALSourceb.SourceRelative, Looping. |
Boolean | value | The value to set the attribute to. |
Source(Int32, ALSourcef, Single)
This function sets a floating-point property of a source.
Declaration
public static void Source(int sid, ALSourcef param, float value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | Source name whose attribute is being set |
ALSourcef | param | The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency. |
Single | value | The value to set the attribute to. |
Source(Int32, ALSourcei, Int32)
This function sets an integer property of a source.
Declaration
public static void Source(int sid, ALSourcei param, int value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | Source name whose attribute is being set. |
ALSourcei | param | The name of the attribute to set: ALSourcei.SourceRelative, ConeInnerAngle, ConeOuterAngle, Looping, Buffer, SourceState. |
Int32 | value | The value to set the attribute to. |
Source(UInt32, ALSource3f, ref Vector3)
This function sets a source property requiring three floating-point values.
Declaration
[CLSCompliant(false)]
public static void Source(uint sid, ALSource3f param, ref Vector3 values)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | Source name whose attribute is being set. |
ALSource3f | param | The name of the attribute to set: ALSource3f.Position, Velocity, Direction. |
Vector3 | values | A Math.Vector3 which the attribute will be set to. |
Source(UInt32, ALSource3f, Single, Single, Single)
This function sets a source property requiring three floating-point values.
Declaration
[CLSCompliant(false)]
public static extern void Source(uint sid, ALSource3f param, float value1, float value2, float value3)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | Source name whose attribute is being set. |
ALSource3f | param | The name of the attribute to set: ALSource3f.Position, Velocity, Direction. |
Single | value1 | The three ALfloat values which the attribute will be set to. |
Single | value2 | The three ALfloat values which the attribute will be set to. |
Single | value3 | The three ALfloat values which the attribute will be set to. |
Source(UInt32, ALSource3i, Int32, Int32, Int32)
This function sets 3 integer properties of a source. This property is used to establish connections between Sources and Auxiliary Effect Slots.
Declaration
[CLSCompliant(false)]
public static extern void Source(uint sid, ALSource3i param, int value1, int value2, int value3)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | Source name whose attribute is being set. |
ALSource3i | param | The name of the attribute to set: EfxAuxiliarySendFilter |
Int32 | value1 | The value to set the attribute to. (EFX Extension) The destination Auxiliary Effect Slot ID |
Int32 | value2 | The value to set the attribute to. (EFX Extension) The Auxiliary Send number. |
Int32 | value3 | The value to set the attribute to. (EFX Extension) optional Filter ID. |
Source(UInt32, ALSourceb, Boolean)
This function sets an bool property of a source.
Declaration
[CLSCompliant(false)]
public static void Source(uint sid, ALSourceb param, bool value)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | Source name whose attribute is being set. |
ALSourceb | param | The name of the attribute to set: ALSourceb.SourceRelative, Looping. |
Boolean | value | The value to set the attribute to. |
Source(UInt32, ALSourcef, Single)
This function sets a floating-point property of a source.
Declaration
[CLSCompliant(false)]
public static extern void Source(uint sid, ALSourcef param, float value)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | Source name whose attribute is being set |
ALSourcef | param | The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency. |
Single | value | The value to set the attribute to. |
Source(UInt32, ALSourcei, Int32)
This function sets an integer property of a source.
Declaration
[CLSCompliant(false)]
public static extern void Source(uint sid, ALSourcei param, int value)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | Source name whose attribute is being set. |
ALSourcei | param | The name of the attribute to set: ALSourcei.SourceRelative, ConeInnerAngle, ConeOuterAngle, Looping, Buffer, SourceState. |
Int32 | value | The value to set the attribute to. |
SourcePause(Int32)
This function pauses a source. The paused source will have its state changed to ALSourceState.Paused.
Declaration
public static void SourcePause(int sid)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | The name of the source to be paused. |
SourcePause(Int32, Int32[])
This function pauses a set of sources. The paused sources will have their state changed to ALSourceState.Paused.
Declaration
public static void SourcePause(int ns, int[] sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be paused. |
Int32[] | sids | A pointer to an array of sources to be paused. |
SourcePause(Int32, UInt32*)
This function pauses a set of sources. The paused sources will have their state changed to ALSourceState.Paused.
Declaration
[CLSCompliant(false)]
public static extern void SourcePause(int ns, uint *sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be paused. |
UInt32* | sids | A pointer to an array of sources to be paused. |
SourcePause(Int32, ref UInt32)
This function pauses a set of sources. The paused sources will have their state changed to ALSourceState.Paused.
Declaration
[CLSCompliant(false)]
public static void SourcePause(int ns, ref uint sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be paused. |
UInt32 | sids | A pointer to an array of sources to be paused. |
SourcePause(Int32, UInt32[])
This function pauses a set of sources. The paused sources will have their state changed to ALSourceState.Paused.
Declaration
[CLSCompliant(false)]
public static void SourcePause(int ns, uint[] sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be paused. |
UInt32[] | sids | A pointer to an array of sources to be paused. |
SourcePause(UInt32)
This function pauses a source. The paused source will have its state changed to ALSourceState.Paused.
Declaration
[CLSCompliant(false)]
public static extern void SourcePause(uint sid)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The name of the source to be paused. |
SourcePlay(Int32)
This function plays, replays or resumes a source. The playing source will have it's state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.
Declaration
public static void SourcePlay(int sid)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | The name of the source to be played. |
SourcePlay(Int32, Int32[])
This function plays a set of sources. The playing sources will have their state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.
Declaration
public static void SourcePlay(int ns, int[] sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be played. |
Int32[] | sids | A pointer to an array of sources to be played. |
SourcePlay(Int32, UInt32*)
This function plays a set of sources. The playing sources will have their state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.
Declaration
[CLSCompliant(false)]
public static extern void SourcePlay(int ns, uint *sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be played. |
UInt32* | sids | A pointer to an array of sources to be played. |
SourcePlay(Int32, ref UInt32)
This function plays a set of sources. The playing sources will have their state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.
Declaration
[CLSCompliant(false)]
public static void SourcePlay(int ns, ref uint sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be played. |
UInt32 | sids | A pointer to an array of sources to be played. |
SourcePlay(Int32, UInt32[])
This function plays a set of sources. The playing sources will have their state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.
Declaration
[CLSCompliant(false)]
public static void SourcePlay(int ns, uint[] sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be played. |
UInt32[] | sids | A pointer to an array of sources to be played. |
SourcePlay(UInt32)
This function plays, replays or resumes a source. The playing source will have it's state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.
Declaration
[CLSCompliant(false)]
public static extern void SourcePlay(uint sid)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The name of the source to be played. |
SourceQueueBuffer(Int32, Int32)
This function queues a set of buffers on a source. All buffers attached to a source will be played in sequence, and the number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed. When first created, a source will be of type ALSourceType.Undetermined. A successful AL.SourceQueueBuffers call will change the source type to ALSourceType.Streaming.
Declaration
public static void SourceQueueBuffer(int source, int buffer)
Parameters
Type | Name | Description |
---|---|---|
Int32 | source | The name of the source to queue buffers onto. |
Int32 | buffer | The name of the buffer to be queued. |
SourceQueueBuffers(Int32, Int32, Int32[])
This function queues a set of buffers on a source. All buffers attached to a source will be played in sequence, and the number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed. When first created, a source will be of type ALSourceType.Undetermined. A successful AL.SourceQueueBuffers call will change the source type to ALSourceType.Streaming.
Declaration
public static void SourceQueueBuffers(int sid, int numEntries, int[] bids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | The name of the source to queue buffers onto. |
Int32 | numEntries | The number of buffers to be queued. |
Int32[] | bids | A pointer to an array of buffer names to be queued. |
SourceQueueBuffers(UInt32, Int32, UInt32*)
This function queues a set of buffers on a source. All buffers attached to a source will be played in sequence, and the number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed. When first created, a source will be of type ALSourceType.Undetermined. A successful AL.SourceQueueBuffers call will change the source type to ALSourceType.Streaming.
Declaration
[CLSCompliant(false)]
public static extern void SourceQueueBuffers(uint sid, int numEntries, uint *bids)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The name of the source to queue buffers onto. |
Int32 | numEntries | The number of buffers to be queued. |
UInt32* | bids | A pointer to an array of buffer names to be queued. |
SourceQueueBuffers(UInt32, Int32, ref UInt32)
This function queues a set of buffers on a source. All buffers attached to a source will be played in sequence, and the number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed. When first created, a source will be of type ALSourceType.Undetermined. A successful AL.SourceQueueBuffers call will change the source type to ALSourceType.Streaming.
Declaration
[CLSCompliant(false)]
public static void SourceQueueBuffers(uint sid, int numEntries, ref uint bids)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The name of the source to queue buffers onto. |
Int32 | numEntries | The number of buffers to be queued. |
UInt32 | bids | A pointer to an array of buffer names to be queued. |
SourceQueueBuffers(UInt32, Int32, UInt32[])
This function queues a set of buffers on a source. All buffers attached to a source will be played in sequence, and the number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed. When first created, a source will be of type ALSourceType.Undetermined. A successful AL.SourceQueueBuffers call will change the source type to ALSourceType.Streaming.
Declaration
[CLSCompliant(false)]
public static void SourceQueueBuffers(uint sid, int numEntries, uint[] bids)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The name of the source to queue buffers onto. |
Int32 | numEntries | The number of buffers to be queued. |
UInt32[] | bids | A pointer to an array of buffer names to be queued. |
SourceRewind(Int32)
This function stops the source and sets its state to ALSourceState.Initial.
Declaration
public static void SourceRewind(int sid)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | The name of the source to be rewound. |
SourceRewind(Int32, Int32[])
This function stops a set of sources and sets all their states to ALSourceState.Initial.
Declaration
public static void SourceRewind(int ns, int[] sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be rewound. |
Int32[] | sids | A pointer to an array of sources to be rewound. |
SourceRewind(Int32, UInt32*)
This function stops a set of sources and sets all their states to ALSourceState.Initial.
Declaration
[CLSCompliant(false)]
public static extern void SourceRewind(int ns, uint *sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be rewound. |
UInt32* | sids | A pointer to an array of sources to be rewound. |
SourceRewind(Int32, ref UInt32)
This function stops a set of sources and sets all their states to ALSourceState.Initial.
Declaration
[CLSCompliant(false)]
public static void SourceRewind(int ns, ref uint sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be rewound. |
UInt32 | sids | A pointer to an array of sources to be rewound. |
SourceRewind(Int32, UInt32[])
This function stops a set of sources and sets all their states to ALSourceState.Initial.
Declaration
[CLSCompliant(false)]
public static void SourceRewind(int ns, uint[] sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to be rewound. |
UInt32[] | sids | A pointer to an array of sources to be rewound. |
SourceRewind(UInt32)
This function stops the source and sets its state to ALSourceState.Initial.
Declaration
[CLSCompliant(false)]
public static extern void SourceRewind(uint sid)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The name of the source to be rewound. |
SourceStop(Int32)
This function stops a source. The stopped source will have it's state changed to ALSourceState.Stopped.
Declaration
public static void SourceStop(int sid)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | The name of the source to be stopped. |
SourceStop(Int32, Int32[])
This function stops a set of sources. The stopped sources will have their state changed to ALSourceState.Stopped.
Declaration
public static void SourceStop(int ns, int[] sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to stop. |
Int32[] | sids | A pointer to an array of sources to be stopped. |
SourceStop(Int32, UInt32*)
This function stops a set of sources. The stopped sources will have their state changed to ALSourceState.Stopped.
Declaration
[CLSCompliant(false)]
public static extern void SourceStop(int ns, uint *sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to stop. |
UInt32* | sids | A pointer to an array of sources to be stopped. |
SourceStop(Int32, ref UInt32)
This function stops a set of sources. The stopped sources will have their state changed to ALSourceState.Stopped.
Declaration
[CLSCompliant(false)]
public static void SourceStop(int ns, ref uint sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to stop. |
UInt32 | sids | A pointer to an array of sources to be stopped. |
SourceStop(Int32, UInt32[])
This function stops a set of sources. The stopped sources will have their state changed to ALSourceState.Stopped.
Declaration
[CLSCompliant(false)]
public static void SourceStop(int ns, uint[] sids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ns | The number of sources to stop. |
UInt32[] | sids | A pointer to an array of sources to be stopped. |
SourceStop(UInt32)
This function stops a source. The stopped source will have it's state changed to ALSourceState.Stopped.
Declaration
[CLSCompliant(false)]
public static extern void SourceStop(uint sid)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The name of the source to be stopped. |
SourceUnqueueBuffer(Int32)
This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed, which is the maximum number of buffers that can be unqueued using this call. The unqueue operation will only take place if all n buffers can be removed from the queue.
Declaration
public static int SourceUnqueueBuffer(int sid)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | The name of the source to unqueue buffers from. |
Returns
Type | Description |
---|---|
Int32 |
SourceUnqueueBuffers(Int32, Int32)
This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed, which is the maximum number of buffers that can be unqueued using this call. The unqueue operation will only take place if all n buffers can be removed from the queue.
Declaration
public static int[] SourceUnqueueBuffers(int sid, int numEntries)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | The name of the source to unqueue buffers from. |
Int32 | numEntries | The number of buffers to be unqueued. |
Returns
Type | Description |
---|---|
Int32[] |
SourceUnqueueBuffers(Int32, Int32, ref Int32)
This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed, which is the maximum number of buffers that can be unqueued using this call. The unqueue operation will only take place if all n buffers can be removed from the queue.
Declaration
public static extern void SourceUnqueueBuffers(int sid, int numEntries, ref int bids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | The name of the source to unqueue buffers from. |
Int32 | numEntries | The number of buffers to be unqueued. |
Int32 | bids | A pointer to an array of buffer names that were removed. |
SourceUnqueueBuffers(Int32, Int32, Int32[])
This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed, which is the maximum number of buffers that can be unqueued using this call. The unqueue operation will only take place if all n buffers can be removed from the queue.
Declaration
public static extern void SourceUnqueueBuffers(int sid, int numEntries, int[] bids)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sid | The name of the source to unqueue buffers from. |
Int32 | numEntries | The number of buffers to be unqueued. |
Int32[] | bids | A pointer to an array of buffer names that were removed. |
SourceUnqueueBuffers(UInt32, Int32, UInt32*)
This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed, which is the maximum number of buffers that can be unqueued using this call. The unqueue operation will only take place if all n buffers can be removed from the queue.
Declaration
[CLSCompliant(false)]
public static extern void SourceUnqueueBuffers(uint sid, int numEntries, uint *bids)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The name of the source to unqueue buffers from. |
Int32 | numEntries | The number of buffers to be unqueued. |
UInt32* | bids | A pointer to an array of buffer names that were removed. |
SourceUnqueueBuffers(UInt32, Int32, ref UInt32)
This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed, which is the maximum number of buffers that can be unqueued using this call. The unqueue operation will only take place if all n buffers can be removed from the queue.
Declaration
[CLSCompliant(false)]
public static extern void SourceUnqueueBuffers(uint sid, int numEntries, ref uint bids)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The name of the source to unqueue buffers from. |
Int32 | numEntries | The number of buffers to be unqueued. |
UInt32 | bids | A pointer to an array of buffer names that were removed. |
SourceUnqueueBuffers(UInt32, Int32, UInt32[])
This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed, which is the maximum number of buffers that can be unqueued using this call. The unqueue operation will only take place if all n buffers can be removed from the queue.
Declaration
[CLSCompliant(false)]
public static extern void SourceUnqueueBuffers(uint sid, int numEntries, uint[] bids)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | sid | The name of the source to unqueue buffers from. |
Int32 | numEntries | The number of buffers to be unqueued. |
UInt32[] | bids | A pointer to an array of buffer names that were removed. |
SpeedOfSound(Single)
AL.SpeedOfSound allows the application to change the reference (propagation) speed used in the Doppler calculation. The source and listener velocities should be expressed in the same units as the speed of sound.
Declaration
public static extern void SpeedOfSound(float value)
Parameters
Type | Name | Description |
---|---|---|
Single | value | A negative or zero value will result in an error, and the command is ignored. Default: 343.3f (appropriate for velocity units of meters and air as the propagation medium). The current setting can be queried using AL.Get with parameter ALGetFloat.SpeedOfSound. |