Show / Hide Table of Contents

Class ALContextAttributes

Convenience class for handling ALContext attributes.

Inheritance
object
ALContextAttributes
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: OpenTK.Audio.OpenAL
Assembly: OpenTK.Audio.OpenAL.dll
Syntax
public class ALContextAttributes

Constructors

ALContextAttributes()

Initializes a new instance of the ALContextAttributes class. Leaving all attributes to the driver implementation default values.

Declaration
public ALContextAttributes()

ALContextAttributes(int?, int?, int?, int?, bool?)

Initializes a new instance of the ALContextAttributes class.

Declaration
public ALContextAttributes(int? frequency, int? monoSources, int? stereoSources, int? refresh, bool? sync)
Parameters
Type Name Description
int? frequency

The mixing output buffer frequency in Hz.

int? monoSources

The number of mono sources available. Not guaranteed.

int? stereoSources

The number of stereo sources available. Not guaranteed.

int? refresh

The refresh interval in Hz.

bool? sync

If the context is synchronous.

Properties

AdditionalAttributes

Gets or sets additional attributes. Will usually be the major and minor version numbers of the context. // FIXME: This needs verification. Docs say nothing about this.

Declaration
public int[] AdditionalAttributes { get; set; }
Property Value
Type Description
int[]

Frequency

Gets or sets the output buffer frequency in Hz. This does not actually change any AL state. To apply these attributes see CreateContext(ALDevice, ALContextAttributes).

Declaration
public int? Frequency { get; set; }
Property Value
Type Description
int?

MonoSources

Gets or sets the number of mono sources. This does not actually change any AL state. To apply these attributes see CreateContext(ALDevice, ALContextAttributes). Not guaranteed to get exact number of mono sources when creating a context.

Declaration
public int? MonoSources { get; set; }
Property Value
Type Description
int?

Refresh

Gets or sets the refrash interval in Hz. This does not actually change any AL state. To apply these attributes see CreateContext(ALDevice, ALContextAttributes).

Declaration
public int? Refresh { get; set; }
Property Value
Type Description
int?

StereoSources

Gets or sets the number of stereo sources. This does not actually change any AL state. To apply these attributes see CreateContext(ALDevice, ALContextAttributes). Not guaranteed to get exact number of mono sources when creating a context.

Declaration
public int? StereoSources { get; set; }
Property Value
Type Description
int?

Sync

Gets or sets if the context is synchronous. This does not actually change any AL state. To apply these attributes see CreateContext(ALDevice, ALContextAttributes).

Declaration
public bool? Sync { get; set; }
Property Value
Type Description
bool?

Methods

CreateAttributeArray()

Converts these context attributes to a CreateContext(ALDevice, int[]) compatible list. Alternativly, consider using the more convenient CreateContext(ALDevice, ALContextAttributes) overload.

Declaration
public int[] CreateAttributeArray()
Returns
Type Description
int[]

The attibute list in the form of a span.

ToString()

Converts the attributes to a string representation.

Declaration
public override string ToString()
Returns
Type Description
string

The string representation of the attributes.

Overrides
object.ToString()
In This Article
Back to top Generated by DocFX